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.
nodebb/Gruntfile.js

77 lines
1.6 KiB
JavaScript

10 years ago
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
express: {
10 years ago
dev: {
options: {
script: 'app.js',
node_env: 'development',
args: ['--log-level=info'],
output: 'NodeBB Ready',
10 years ago
interrupt: true,
spawn: false,
interval: 100
10 years ago
}
},
serverUpdated: {
10 years ago
options: {
script: 'app.js',
node_env: 'development',
args: ['--from-file=less,js', '--log-level=info'],
output: 'NodeBB Ready',
10 years ago
interrupt: true,
spawn: false,
interval: 100
10 years ago
}
},
clientUpdated: {
10 years ago
options: {
script: 'app.js',
node_env: 'development',
args: ['--from-file=less', '--log-level=info'],
output: 'NodeBB Ready',
interrupt: true,
spawn: false,
interval: 100
}
},
lessUpdated: {
options: {
script: 'app.js',
node_env: 'development',
args: ['--from-file=js', '--log-level=info'],
output: 'NodeBB Ready',
10 years ago
interrupt: true,
spawn: false,
interval: 100
10 years ago
}
}
10 years ago
},
less: {
development: {
files: {
'public/bin/manifest.css': 'source/manifest.less'
10 years ago
}
}
},
watch: {
lessUpdated: {
files: 'public/**/*.less',
tasks: ['express:lessUpdated']
},
clientUpdated: {
files: 'public/src/**/*.js',
tasks: ['express:clientUpdated']
},
serverUpdated: {
files: ['*.js', 'src/**/*.js'],
tasks: ['express:serverUpdated']
10 years ago
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-express-server');
grunt.registerTask('default', ['express:dev', 'watch']);
10 years ago
};