Merge pull request #144 from xPaw/remove-grunt
Invoke handlebars outside of grunt, generate sourcemap
This commit is contained in:
commit
d7738789af
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,5 +3,6 @@ npm-debug.log
|
|||||||
|
|
||||||
# Built assets created at npm install/prepublish time
|
# Built assets created at npm install/prepublish time
|
||||||
# See https://docs.npmjs.com/misc/scripts
|
# See https://docs.npmjs.com/misc/scripts
|
||||||
|
client/js/libs.min.js.map
|
||||||
client/js/libs.min.js
|
client/js/libs.min.js
|
||||||
client/js/lounge.templates.js
|
client/js/lounge.templates.js
|
||||||
|
19
Gruntfile.js
19
Gruntfile.js
@ -7,6 +7,7 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
uglify: {
|
uglify: {
|
||||||
options: {
|
options: {
|
||||||
|
sourceMap: true,
|
||||||
compress: false
|
compress: false
|
||||||
},
|
},
|
||||||
js: {
|
js: {
|
||||||
@ -18,24 +19,8 @@ module.exports = function(grunt) {
|
|||||||
});
|
});
|
||||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||||
grunt.loadNpmTasks("grunt-contrib-watch");
|
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(
|
grunt.registerTask(
|
||||||
"default",
|
"default",
|
||||||
["uglify", "build"]
|
["uglify"]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node index",
|
"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",
|
"test": "HOME=test/fixtures mocha test/**/*.js && npm run lint",
|
||||||
"lint": "eslint . && stylelint \"**/*.css\"",
|
"lint": "eslint . && stylelint \"**/*.css\"",
|
||||||
"prepublish": "npm run build"
|
"prepublish": "npm run build"
|
||||||
|
Loading…
Reference in New Issue
Block a user