var fs = require('fs');
var path = require("path");

function ghtml(dest, prefix, callback) {
var  str = `
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>gka-animation-preview</title>
    <link href="./${prefix}gka.css" rel="stylesheet" type="text/css">
</head>
<body>
    <div class="gka-animation ${prefix}animation"></div>
</body>
</html>
`;

    callback && callback(str);
}

module.exports = ghtml;

@@ -74,16 +74,27 @@
  prefix,
+ distsName,
  callbac
@@ -98,16 +98,16 @@
 back) %7B%0A
-
 var  str
@@ -312,16 +312,25 @@
     %3Cdiv
+ id=%22gka%22
  class=%22
@@ -337,43 +337,514 @@
 gka-
-animation $%7Bprefix%7Danimation%22%3E%3C/div
+base%22%3E%3C/div%3E%0A    %3Cscript%3E%0A    function loadImage(names, cb, prefix)%7B%0A        var n = 0, img;%0A        names.forEach(function(name) %7B%0A            img = new Image();%0A            img.onload = function() %7B%0A                (++n === names.length) && cb && cb();%0A            %7D;%0A            img.src = (prefix %7C%7C '') + name;%0A        %7D);%0A    %7D%0A%0A    var imgNames = $%7BdistsName%7D;%0A%0A    loadImage(imgNames, function() %7B%0A        document.getElementById('gka').className += %22 $%7Bprefix%7Danimation%22%0A    %7D, %22img/%22)%0A    %3C/script
 %3E%0A%3C/

add preload