Skip to content

Instantly share code, notes, and snippets.

@kurtbartholomew
Created March 18, 2015 17:53
Show Gist options
  • Save kurtbartholomew/0a9ea5594e86cf48e235 to your computer and use it in GitHub Desktop.
Save kurtbartholomew/0a9ea5594e86cf48e235 to your computer and use it in GitHub Desktop.
Basic LiveReloading Webdev Gruntfile
module.exports = function(grunt) {
grunt.initConfig({
//pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['Gruntfile.js', 'js/*.js']
},
watch: {
scripts: {
files: ['Gruntfile.js','js/*.js'],
tasks: 'jshint',
options : {
livereload: true
// Place the script below in the main html file
// <script src="//localhost:35729/livereload.js"></script>
}
},
css: {
files: ['css/*.css'],
options : {
livereload: true
}
},
html: {
files: ['*.html'],
options : {
livereload: true
}
}
},
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment