2014-09-13 21:29:45 +00:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
var libs = "client/js/libs/**/*.js";
|
|
|
|
grunt.initConfig({
|
|
|
|
watch: {
|
|
|
|
files: libs,
|
|
|
|
tasks: ["uglify"]
|
|
|
|
},
|
|
|
|
uglify: {
|
|
|
|
options: {
|
|
|
|
compress: false
|
|
|
|
},
|
|
|
|
js: {
|
|
|
|
files: {
|
|
|
|
"client/js/libs.min.js": libs
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
grunt.loadNpmTasks("grunt-contrib-uglify");
|
|
|
|
grunt.loadNpmTasks("grunt-contrib-watch");
|
2014-10-08 19:15:57 +00:00
|
|
|
grunt.registerTask(
|
2014-10-10 20:05:25 +00:00
|
|
|
"build",
|
2014-10-08 19:15:57 +00:00
|
|
|
function() {
|
|
|
|
grunt.util.spawn({
|
|
|
|
cmd: "node",
|
|
|
|
args: [
|
|
|
|
"node_modules/handlebars/bin/handlebars",
|
|
|
|
"client/views/",
|
|
|
|
"-e", "tpl",
|
|
|
|
"-f", "client/js/shout.templates.js"
|
|
|
|
]
|
|
|
|
}, function(err) {
|
|
|
|
if (err) console.log(err);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|
2014-09-13 21:29:45 +00:00
|
|
|
grunt.registerTask(
|
|
|
|
"default",
|
2014-10-10 20:05:25 +00:00
|
|
|
["uglify", "build"]
|
2014-09-13 21:29:45 +00:00
|
|
|
);
|
|
|
|
};
|