-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGruntfile.js
51 lines (39 loc) · 1.11 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
module.exports = function(grunt) {
grunt.initConfig({
'http-server': {
'dev': {
// the server root directory
root: 'test/fixture/browser',
port: 8282,
// port: function() { return 8282; }
host: "127.0.0.1",
cache: -1,
showDir: false,
autoIndex: false,
defaultExt: "html",
// run in parallel with other tasks
runInBackground: false
}
},
'mixdown-router': {
options: {
router_template: './test/fixture/browser/helper/router_template.js.tpl',
dest: './test/fixture/browser',
paths: [{
path: './test/fixture/controllers/api_v1',
url_prefix: '/api/v1'
}, {
path: './test/fixture/controllers/api_v2'
}, {
path: './test/fixture/controllers/pages',
url_prefix: '',
add_namespace: false
}]
}
}
});
grunt.loadNpmTasks('grunt-http-server');
grunt.task.loadTasks('./tasks');
grunt.registerTask('default', ['browser', 'http-server:dev']);
grunt.registerTask('browser', ['mixdown-router']);
};