Created
May 26, 2013 03:27
-
-
Save blockloop/5651616 to your computer and use it in GitHub Desktop.
hexo gruntfile generate example
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.loadNpmTasks('grunt-shell'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.initConfig({ | |
watch: { | |
sourceFiles: { | |
files: ['themes/**','scaffolds/**','scripts/**','source/**','app.js'], | |
tasks: 'shell:hexoGen' | |
}, | |
}, | |
shell: { | |
hexoGen: { | |
command: 'hexo generate' | |
} | |
}, | |
}); | |
// Default task. | |
grunt.registerTask('default', 'watch'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want it to clean first you can add another shell task
and change your watch tasks to