forked from project-belligerence/Belligerence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
121 lines (105 loc) · 2.24 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
(function(){
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
var config = require('./config');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
express: {
options: {
port: config.port
},
web: {
options: {
script: config.files.app
}
}
},
watch: {
gruntfile: {
files: ['Gruntfile.js'],
tasks: ['jshint']
},
js: {
files: [
'routes/**/*.js',
'test/**/*.js',
'modules/**/*.js',
'dev/js/**/*.js',
config.files.app,
config.folders.config + '/**/*.js',
],
tasks: ['jshint']
},
sass: {
files: [config.folders.dev + '/sass/**/*.scss'],
tasks: ['sass:dist']
},
server: {
files: [
'.env',
'app.js',
'config.js',
config.folders.config + '/**/*.js',
'routes/**/*.js',
'modules/**/*.js'
],
tasks: ['express:web'],
options: {
nospawn: true,
atBegin: true
}
},
livereload: {
files: [
config.folders.views,
config.folders.views + '/**/*.ejs',
config.folders.public + '/js/**/*.js',
config.folders.public + '/styles/**/*.css'
],
options: { livereload: true }
}
},
jshint: {
all: [
'routes/**/*.js',
'test/**/*.js',
'modules/**/*.js',
config.folders.config + '/**/*.js',
config.folders.dev + '/js/**/*js',
config.files.app,
config.files.config,
config.files.gruntfile,
'!dev/js/lib/**/*.js'
],
options: { node: true }
},
sass: {
options: {
sourceMap: false,
outputStyle: 'compressed'
},
dist: {
files: [{
'public/styles/vendor.css': 'dev/sass/vendor.scss',
'public/styles/main.css': 'dev/sass/main.scss'
}]
}
},
parallel: {
web: {
options: { stream: true },
tasks: [
{ grunt: true, args: ['watch:gruntfile'] },
{ grunt: true, args: ['watch:server'] },
{ grunt: true, args: ['watch:js'] },
{ grunt: true, args: ['watch:sass'] },
{ grunt: true, args: ['watch:livereload'] }
]
}
}
});
grunt.registerTask('default', ['parallel:web']);
grunt.registerTask('build', ['sass']);
};
})();