-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
79 lines (69 loc) · 1.72 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
module.exports = function(grunt) {
var watchFiles = {
serverJS: ['gruntfile.js', 'server/server.js', 'server/config/**/*.js', 'server/app/**/*.js'],
mochaTests: ['server/tests/**/*.js']
};
grunt.initConfig({
mochaTest: {
src: watchFiles.mochaTests,
options: {
reporter: 'spec',
require: 'server/start.js'
}
},
nodemon: {
dev: {
script: 'server/start.js',
options: {
nodeArgs: ['--debug'],
ext: 'js,html',
watch: watchFiles.serverJS
}
}
},
'node-inspector': {
custom: {
options: {
'web-port': 4202,
'web-host': 'localhost',
'debug-port': 5858,
'save-live-edit': true,
'no-preload': true,
'stack-trace-limit': 50,
'hidden': []
}
}
},
concurrent: {
default: ['nodemon'],
serve: ['nodemon', 'node-inspector', 'shell:serve'],
options: {
logConcurrentOutput: true,
limit: 10
}
},
shell: {
serve: {
command: 'ember serve --proxy http://localhost:4201'
},
test: {
command: 'ember test --server'
}
},
env: {
test: {
NODE_ENV: 'test'
}
},
});
grunt.registerTask('serve', ['concurrent:serve']);
grunt.registerTask('testserver', ['env:test', 'mochaTest']);
grunt.registerTask('testclient', ['shell:test']);
grunt.registerTask('default', ['concurrent']);
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-node-inspector');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-env');
}