diff --git a/Gruntfile.js b/Gruntfile.js index 28e26fb..3de4a63 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,7 +3,7 @@ module.exports = function (grunt) { grunt.loadTasks("tasks"); - grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "inlinedata", "cachebreaker", "inline"]); + grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass:dist", "postcss", "requirejs:default", "inlinedata", "cachebreaker", "inline", "clean:release"]); grunt.registerTask("lint", ["sasslint", "eslint"]); - grunt.registerTask("serve", ["bower-install-simple", "lint", "copy", "sass", "requirejs:dev", "inlinedata", "browserSync", "watch"]); + grunt.registerTask("serve", ["bower-install-simple", "lint", "copy", "sass:dev", "requirejs:dev", "inlinedata", "browserSync", "watch"]); }; diff --git a/tasks/build.js b/tasks/build.js index f4d124b..d56471a 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -48,11 +48,19 @@ module.exports = function (grunt) { } }, sass: { + dev: { options: { sourceMap: true, - outputStyle: "compressed" + outputStyle: "expanded" + }, + files: { + "build/style.css": "scss/main.scss" + } }, dist: { + options: { + outputStyle: "compressed" + }, files: { "build/style.css": "scss/main.scss" } @@ -121,7 +129,8 @@ module.exports = function (grunt) { include: "../app", optimize: "none", out: "build/app.js", - build: false + build: false, + generateSourceMaps: true } } }, diff --git a/tasks/clean.js b/tasks/clean.js index 67181e0..35d30a3 100644 --- a/tasks/clean.js +++ b/tasks/clean.js @@ -3,7 +3,8 @@ module.exports = function (grunt) { grunt.config.merge({ clean: { - build: ["build/**/*", "node_modules/grunt-newer/.cache"] + build: ["build/**/*", "node_modules/grunt-newer/.cache"], + release: ["build/vendor", "build/app.js.map", "build/config.json", "build/style.css*"] } });