-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
45 lines (37 loc) · 1.14 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
// howto enable livereload
//
// install node
// npm install grunt
// cd .; npm install
// grunt server
// open browser http://localhost:8080/?local=true
// change a file and watch the browser
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
watch: {
options: {livereload: true},
all: {
files: ['src/main/webapp/**/*.html', 'src/main/webapp/app/**/*.js', 'src/main/webapp/css/**/*.css']
//files: ['**/*.js', '**/*.html', '**/*.css'],
}
},
// grunt-contrib-connect will serve the files of the project
// on specified port and hostname
connect: {
all: {
options: {
base: 'src/main/webapp',
port: 8080,
hostname: "0.0.0.0",
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
// Default task(s).
grunt.registerTask('default', []);
grunt.registerTask('server', ['connect', 'watch']);
};