diff --git a/.gitignore b/.gitignore index 1417c27b..ad258963 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ npm-debug.log # Built assets created at npm install/prepublish time # See https://docs.npmjs.com/misc/scripts +client/js/libs.min.js.map client/js/libs.min.js client/js/lounge.templates.js diff --git a/Gruntfile.js b/Gruntfile.js index e0f433ca..49f9477b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,6 +7,7 @@ module.exports = function(grunt) { }, uglify: { options: { + sourceMap: true, compress: false }, js: { @@ -18,24 +19,8 @@ module.exports = function(grunt) { }); grunt.loadNpmTasks("grunt-contrib-uglify"); grunt.loadNpmTasks("grunt-contrib-watch"); - grunt.registerTask( - "build", - function() { - grunt.util.spawn({ - cmd: "node", - args: [ - "node_modules/handlebars/bin/handlebars", - "client/views/", - "-e", "tpl", - "-f", "client/js/lounge.templates.js" - ] - }, function(err) { - if (err) console.log(err); - }); - } - ); grunt.registerTask( "default", - ["uglify", "build"] + ["uglify"] ); }; diff --git a/package.json b/package.json index 3b8caf9d..1e18f972 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "scripts": { "start": "node index", - "build": "grunt", + "build": "grunt && handlebars client/views/ -e tpl -f client/js/lounge.templates.js", "test": "HOME=test/fixtures mocha test/**/*.js && npm run lint", "lint": "eslint . && stylelint \"**/*.css\"", "prepublish": "npm run build"