diff --git a/index.js b/index.js index 6204214cf8f0e670e04ee5aa7788e13232becee1..aa6e02b5cf1bd9062b2faa43893fdc6eea5d489b 100755 --- a/index.js +++ b/index.js @@ -30,6 +30,7 @@ var sitegin = function(config) { // If it is running - schedule rerun after it finishes var isRunning = false; var runAgain = false; + var first = false; var doSync = function(){} function run() { var startTime = moment(); @@ -47,6 +48,10 @@ var sitegin = function(config) { isRunning = false; console.log('Generator finished in',moment().diff(startTime,'seconds'),'seconds') doSync(); + if(!first) { + first = true; + copyStaticFiles(config.builddir, config.staticDir, config.themeDir); + } if(runAgain) run(); }) .catch(function(e) { @@ -63,7 +68,7 @@ var sitegin = function(config) { console.log('Sitegin successfully loaded'); run(); - copyStaticFiles(config.builddir, config.staticDir, config.themeDir); + rendersass(config.builddir, config.themeDir); if(!options.noserver) {