UNPKG

848 BJavaScriptView Raw
1module.exports = function(grunt) {
2
3 var config = {
4
5 }
6
7 grunt.loadNpmTasks('grunt-express-server');
8 grunt.loadNpmTasks('grunt-contrib-watch');
9
10 // Project configuration.
11 grunt.initConfig({
12 pkg: grunt.file.readJSON('package.json'),
13
14 watch: {
15
16 express: {
17 files: [
18 'app/**/*'
19 , 'js/*.js'
20 ],
21 tasks: [ 'express:dev' ],
22 options: {
23 nospawn: true // for grunt-contrib-watch v0.5.0+, "nospawn: true" for lower versions. Without this option specified express won't be reloaded
24 }
25 }
26 },
27 express: {
28 options: {
29 // Override defaults here
30 },
31 dev: {
32 options: {
33 script: 'dev-start.js'
34 }
35 }
36 }
37 });
38
39 // Default task(s).
40 grunt.registerTask('default', ['yesman']);
41
42 grunt.registerTask('yesman', [
43 'express:dev',
44 'watch'
45 ]);
46
47};
\No newline at end of file