You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.3 KiB
JavaScript
65 lines
1.3 KiB
JavaScript
module.exports = function(grunt) {
|
|
grunt.initConfig({
|
|
pkg: grunt.file.readJSON('package.json'),
|
|
express: {
|
|
dev: {
|
|
options: {
|
|
script: 'app.js',
|
|
node_env: 'development',
|
|
args: ['dev', 'from-file'],
|
|
output: "NodeBB Ready",
|
|
interrupt: true,
|
|
spawn: false,
|
|
interval: 100
|
|
}
|
|
},
|
|
minifyJS: {
|
|
options: {
|
|
script: 'app.js',
|
|
node_env: 'development',
|
|
args: ['dev', 'minify-js'],
|
|
output: "NodeBB Ready",
|
|
interrupt: true,
|
|
spawn: false,
|
|
interval: 100
|
|
}
|
|
},
|
|
compileLESS: {
|
|
options: {
|
|
script: 'app.js',
|
|
node_env: 'development',
|
|
args: ['dev', 'compile-less'],
|
|
output: "NodeBB Ready",
|
|
interrupt: true,
|
|
spawn: false,
|
|
interval: 100
|
|
}
|
|
}
|
|
},
|
|
less: {
|
|
development: {
|
|
files: {
|
|
"public/bin/manifest.css": "source/manifest.less"
|
|
}
|
|
}
|
|
},
|
|
watch: {
|
|
compileLESS: {
|
|
files: "**/*.less",
|
|
tasks: ['express:compileLESS'],
|
|
options: {
|
|
livereload: true,
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
grunt.loadNpmTasks('grunt-express-server');
|
|
|
|
grunt.registerTask('default', ['express:dev', 'watch']);
|
|
|
|
grunt.event.on('watch', function(action, filepath, target) {
|
|
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
|
|
});
|
|
}; |