Skip to content

Instantly share code, notes, and snippets.

@vishu17
Created November 23, 2014 11:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishu17/460f71bf7c6236673135 to your computer and use it in GitHub Desktop.
Save vishu17/460f71bf7c6236673135 to your computer and use it in GitHub Desktop.
gruntfile config for static sites
module.exports = function (grunt) {
grunt.initConfig({
connect: {
server: {
options: {
directory: '.', //Local dir that the gruntfile resides in
livereload: true,
port: 9001, // Your server will run on http://localhost:9001/
base: '.'
}
}
},
watch: {
livereload: {
options: { livereload: true },
files: ['index.html'], // Files to watch for reloading the browser
},
}
});
// Install contrib watch and connect first and make a package.json in case you haven't already
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