-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
35 lines (32 loc) · 1.02 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
// Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
protocol:'http',
hostname:'localhost',
base:'./',
keepalive: true,
open:{
target:'http://localhost:5050/index.html', // target url to open
appName:'Google Chrome', // name of the app that opens, ie: open, start, xdg-open
callback: function() {
grunt.log("Server connected !!!").ok();
} // called when the app has opened
},
port: 5050
}
}
}
})
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-http');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['connect','open']);
grunt.registerTask('app', ['connect:server','open']);
};