-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
58 lines (54 loc) · 1.19 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
/**
* Gruntfile
*/
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// Mocha config
mochaTest: {
test: {
src: ['test/**/*.js']
}
},
// Watch task config
watch: {
sass: {
files: "public/scss/*.scss",
tasks: ['sass']
}
},
// SASS task config
sass: {
dev: {
files: [{
expand: true,
cwd: 'public/scss',
src: ['*.scss'],
dest: 'public/css',
ext: '.css'
}]
}
},
// Nodemon
nodemon: {
dev: {
script: 'index.js',
options: {
ignore: ['Gruntfile.js', 'test/**', 'public/**', 'logs/**', 'views/**']
}
}
},
concurrent: {
dev: ['watch', 'sass:dev', 'nodemon'],
options: {
logConcurrentOutput: true
}
}
});
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-nodemon');
grunt.registerTask('test', 'mochaTest');
grunt.registerTask('start', ['concurrent:dev']);
};