-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile-LR.js
46 lines (45 loc) · 1.2 KB
/
Gruntfile-LR.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
// Spawn a separate process for LiveReload for a much better performance.
// See:
// https://github.com/gruntjs/grunt-contrib-watch/issues/69
// https://github.com/gruntjs/grunt-contrib-watch/issues/231
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
config: require('./build.config.js'),
watch: {
livereload: {
options: {
livereload: '<%= connect.options.livereload %>',
debounceDelay: 1000
},
files: [
'<%= config.srcDir %>/{,*/}*.html',
'<%= config.srcDir %>/scripts/{,*/,*/*/}*.js',
'<%= config.srcDir %>/sounds/{,*/}*',
'<%= config.tempDir %>/styles/{,*/}*.css'
]
}
},
connect: {
options: {
port: '<%= config.devPort %>',
hostname: '0.0.0.0',
livereload: '<%= config.livereloadPort %>'
},
livereload: {
options: {
open: 'http://localhost:<%= connect.options.port %>',
base: [
'<%= config.tempDir %>',
'<%= config.srcDir %>'
]
}
}
}
});
grunt.registerTask('default', [
'connect:livereload',
'watch'
]);
};