Created
November 23, 2014 11:46
-
-
Save vishu17/460f71bf7c6236673135 to your computer and use it in GitHub Desktop.
gruntfile config for static sites
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({ | |
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