Skip to content

Instantly share code, notes, and snippets.

@carlcraig
Created February 1, 2015 04:03
Show Gist options
  • Save carlcraig/f1b100d9b2b2d3fc4683 to your computer and use it in GitHub Desktop.
Save carlcraig/f1b100d9b2b2d3fc4683 to your computer and use it in GitHub Desktop.
Simple Grunt LiveReload
module.exports = function(grunt) {
grunt.initConfig({
watch: {
options: {
livereload: true
},
app: {
files: ['index.html', 'partials/**/*.html', 'js/**/*.js', 'css/**/*.css'],
tasks: []
}
},
connect: {
server: {
options: {
host: '0.0.0.0',
port: 9000,
livereload: true,
open: 'http://localhost:9000/',
base: '.'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('default', ['connect', 'watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment