-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
63 lines (54 loc) · 1.43 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
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
less: {
app: {
files: {
'web/assets/css/styles.css': 'web/app/main.less'
}
}
},
watch: {
web: {
files: 'web/app/**/*',
tasks: ['less:app', 'concat:app']
},
back: {
files: ['src/**/*.{js,html}'],
tasks: ['express:local'],
options: {
atBegin: true,
spawn: false
}
}
},
express: {
local: {
options: {
script: 'bin/awesomelib.js',
args: ['--debug'],
port: 3788
}
}
},
concat: {
app: {
src: ['web/app/module.js', 'web/app/**/*.js'],
dest: 'web/assets/js/app.js'
}
},
concurrent: {
options: {
logConcurrentOutput: true
},
dev: ['watch:back', 'watch:web']
},
compile: {
dev: ['less', 'concat']
}
});
grunt.registerMultiTask('compile', function () {
grunt.task.run(this.data);
});
grunt.registerTask('run', ['compile:dev', 'concurrent:dev']);
};