Created
September 2, 2015 11:59
-
-
Save hmarcelodn/6790852069c2662422a9 to your computer and use it in GitHub Desktop.
Gruntfile.js Template for having LiveReload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
connect: { | |
all:{ | |
options:{ | |
port: 9000, | |
hostname:"0.0.0.0", | |
keepalive: true, | |
} | |
} | |
}, | |
open:{ | |
all:{ | |
path: 'http://localhost:9000', | |
app: 'chrome' | |
} | |
}, | |
watch:{ | |
src:{ | |
options:{ | |
livereload: true | |
}, | |
files: [ | |
'*.html' | |
], | |
} | |
}, | |
}); | |
grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.loadNpmTasks('grunt-open'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.registerTask('server', [ | |
'open', | |
'connect', | |
'watch' | |
]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment