Skip to content

Instantly share code, notes, and snippets.

@hmarcelodn
Created September 2, 2015 11:59
Show Gist options
  • Save hmarcelodn/6790852069c2662422a9 to your computer and use it in GitHub Desktop.
Save hmarcelodn/6790852069c2662422a9 to your computer and use it in GitHub Desktop.
Gruntfile.js Template for having LiveReload
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