-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgruntFile.js
56 lines (54 loc) · 1.18 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
module.exports = function(grunt) {
['grunt-contrib-jshint',
'grunt-contrib-sass',
'grunt-contrib-watch',
'grunt-express-server'].forEach(grunt.loadNpmTasks);
grunt.initConfig({
jshint: {
files: '**/*.js',
options: { jshintrc: '.jshintrc' }
},
sass: {
dist: {
files: [{
expand: true,
cwd: 'public/styles',
src: ['*.scss'],
dest: 'public/styles',
ext: '.css'
}]
}
},
watch: {
scriptsApp: {
files: ['*.js', 'app/**/*.js', '!gruntFile.js'],
tasks: ['express:dev'],
options: {
spawn: false // Without this option specified express won't be reloaded
}
},
styles: {
files: 'public/styles/**/*.scss',
tasks: ['sass:dist']
}
},
express: {
options: {
port: 1337
},
dev: {
options: {
script: 'app.js'
}
},
release: {
options: {
script: 'app.js',
background: true
}
}
}
});
grunt.registerTask('validate', ['jshint']);
grunt.registerTask('dev', ['sass', 'express:dev', 'watch']);
};