forked from amrdraz/python-debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserve.js
More file actions
47 lines (36 loc) · 1.02 KB
/
serve.js
File metadata and controls
47 lines (36 loc) · 1.02 KB
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
// `grunt serve`
// Starts up a development server that watches for local file changes
// and automatically reloads them to the browser.
'use strict';
var taskConfig = function(grunt) {
grunt.registerTask('serve', 'Open a development server within your browser', function(target) {
// Allow for remote access to app/site via the 0.0.0.0 ip address
if (grunt.option('allow-remote')) {
grunt.config.set('connect.options.hostname', '0.0.0.0');
}
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
}
grunt.task.run([
'clean:tmp',
'copy:server',
// 'injector',
'wiredep',
'swig:server',
'sass:server',
// 'jsdoc:server',
'autoprefixer:server'
]);
if (target === 'nowatch') {
return;
}
grunt.task.run([
'connect:server'
]);
if (target === 'docs') {
return grunt.task.run(['listen:docs']);
}
return grunt.task.run(['watch']);
});
};
module.exports = taskConfig;