-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
103 lines (97 loc) · 1.95 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
'use strict';
module.exports = function(grunt) {
// #### Load all grunt tasks
require('matchdep').filterDev(['grunt-*', '!grunt-cli']).forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
js: {
files: ['src/coffee/*.coffee'],
tasks: ['coffee:main', 'uglify:js'],
options: {
livereload: true,
spawn: false
}
},
css: {
files: ['src/sass/*.scss'],
tasks: ['sass'],
options: {
livereload: true,
spawn: false
}
},
express: {
files: ['app.js', 'model/*.js', 'routes/*.js'],
tasks: ['express:dev'],
options: {
spawn: false
}
}
},
uglify: {
options: {
mangle: true,
compress: true,
banner: "/* Vulcun Chat */\n"
},
js: {
files: [{
expand: true,
cwd: 'src/js',
src: '*.js',
dest: 'public/js',
ext: '.min.js'
}]
}
},
coffee: {
main: {
options: {
bare: true
},
expand: true,
flatten: true,
cwd: 'src/coffee',
src: ['*.coffee'],
dest: 'src/js',
ext: '.js'
}
},
sass: {
app: {
options: {
style: 'compressed'
},
files: {
'public/css/main.css': 'src/sass/main.scss'
}
}
},
express: {
options: {
script: 'bin/www',
output: 'Vulcun Chat is running'
},
dev: {
options: {}
},
test: {
options: {
node_env: 'testing'
}
}
},
execute: {
createDB: {
src: ['database.js']
},
populate: {
src: ['populate.js']
}
}
})
// Default task(s).
grunt.registerTask('default');
grunt.registerTask('server', ['express:dev']);
};