Last active
December 20, 2015 22:59
-
-
Save parkji/6209581 to your computer and use it in GitHub Desktop.
Grunt file for building and serving jekyll sites. Means you can just do grunt watch instead of running two Jekyll commands
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({ | |
pkg: grunt.file.readJSON('package.json'), | |
shell: { | |
jekyllBuild: { | |
command: 'jekyll build' | |
}, | |
jekyllServe: { | |
command: 'jekyll serve' | |
} | |
}, | |
watch: { | |
files: [ | |
'_includes/*.html', | |
'_layouts/*.html', | |
'_posts/*.markdown', | |
'_config.yml', | |
'index.html' | |
], | |
tasks: ['shell:jekyllBuild', 'shell:jekyllServe'], | |
options: { | |
interrupt: true, | |
atBegin: true, | |
livereload: true | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-shell'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.registerTask('default', ['shell']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment