-
-
Save philippkeller/67f20ebe360327d9ce68 to your computer and use it in GitHub Desktop.
Setup for auto reload (livereload) changes of coffeescript in hexo
This file contains hidden or 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 = -> | |
@initConfig | |
watch: | |
sourceFiles: | |
options: | |
livereload: true | |
files: ['themes/**','scaffolds/**','scripts/**','source/**','!source/**/site.coffee','app.js'] | |
tasks: ['shell:hexoGen'] | |
coffee: | |
options: | |
livereload: true | |
files: ['source/**/site.coffee'] | |
tasks: ['shell:clean_coffee', 'shell:hexoGen'] | |
shell: | |
hexoGen: | |
command: 'hexo generate' | |
clean: | |
command: 'rm -rf public' | |
clean_coffee: | |
command: 'rm public/scripts/site.js' | |
connect: | |
server: | |
options: | |
base: 'public' | |
hostname: '*' | |
livereload: true | |
@loadNpmTasks 'grunt-shell' | |
@loadNpmTasks 'grunt-contrib-watch' | |
@loadNpmTasks 'grunt-contrib-connect' | |
@loadNpmTasks 'grunt-shell' | |
@registerTask 'default', ['connect', 'watch'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment