From ce2ac6fe478eaffee214333cafb23973c17b45bf Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sun, 21 Feb 2016 20:42:01 +0200 Subject: [PATCH] More improvements to deploy tasks. --- gulpfile.js | 12 ++++++++---- scripts/dist.clj | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 221c7347e..94850b737 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,7 +11,7 @@ var rimraf = require("rimraf"); var paths = {}; paths.app = "./resources/"; paths.output = "./resources/public/"; -paths.dist = "./dist"; +paths.dist = "./dist/"; paths.scss = paths.app + "styles/**/*.scss"; gulp.task("scss", function() { @@ -41,9 +41,13 @@ gulp.task("styles:dist", function(next) { runseq("scss", "autoprefixer", next); }); -gulp.task("clean", function(next) { +gulp.task("clean:dist", function(next) { + rimraf(paths.dist + "**/*", next); +}); + +gulp.task("clean:public", function(next) { rimraf(paths.output + "css/", function() { - rimraf(paths.output + "js/", next) + rimraf(paths.output + "js/", next); }); }); @@ -54,7 +58,7 @@ gulp.task("copy", function() { // Default gulp.task("dist", function(next) { - runseq("clean", "styles:dist", "cssmin", "copy", next); + runseq("clean:public", "styles:dist", "cssmin", "clean:dist", "copy", next); }); // Watch diff --git a/scripts/dist.clj b/scripts/dist.clj index c2181f767..53e87e1f0 100644 --- a/scripts/dist.clj +++ b/scripts/dist.clj @@ -14,7 +14,8 @@ :warnings {:ns-var-clash false} :output-to "resources/public/js/main.js" :output-dir "resources/public/js" - :optimizations :advanced + :optimizations :simple + :static-fns true :language-in :ecmascript5 :language-out :ecmascript5 :verbose true})