Files
NodeBB/Gruntfile.js

56 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-01-30 13:06:04 -05:00
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
express: {
2015-01-30 13:06:04 -05:00
dev: {
options: {
script: 'app.js',
node_env: 'development',
args: ['dev', 'from-file'],
output: "NodeBB Ready"
2015-01-30 13:06:04 -05:00
}
},
minifyJS: {
options: {
script: 'app.js',
node_env: 'development',
args: ['dev', 'minify-js'],
output: "NodeBB Ready"
2015-01-30 13:06:04 -05:00
}
},
compileLESS: {
2015-01-30 13:06:04 -05:00
options: {
script: 'app.js',
node_env: 'development',
args: ['dev', 'compile-less'],
output: "NodeBB Ready"
2015-01-30 13:06:04 -05:00
}
}
2015-01-30 13:06:04 -05:00
},
less: {
development: {
files: {
"public/bin/manifest.css": "source/manifest.less"
2015-01-30 13:06:04 -05:00
}
}
},
watch: {
compileLESS: {
files: "**/*.less",
tasks: ['express:compileLESS'],
2015-01-30 13:06:04 -05:00
options: {
livereload: true,
2015-01-30 13:06:04 -05:00
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-express-server');
grunt.registerTask('default', ['express:dev', 'watch']);
2015-01-30 13:06:04 -05:00
grunt.event.on('watch', function(action, filepath, target) {
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
});
2015-01-30 13:06:04 -05:00
};