Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaellopez/56c703c51212bb6b0d23 to your computer and use it in GitHub Desktop.
Save michaellopez/56c703c51212bb6b0d23 to your computer and use it in GitHub Desktop.
terminal = require('color-terminal')
log = (error, stdout, stderr, cb) ->
if error
terminal.color('red').write stdout
else
terminal.color('green').write stdout
cb()
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch' # https://github.com/gruntjs/grunt-contrib-watch
grunt.loadNpmTasks 'grunt-shell' # https://github.com/sindresorhus/grunt-shell
grunt.initConfig
vagrantPath: '<path to .vagrant dir>' # TO MODIFY
watch:
src:
options:
spawn: false
files: [
'some paths...' # TO MODIFY
]
tasks: 'shell:vagrant_rsync'
shell:
vagrant_rsync:
options:
callback: log
command: 'cd <%= vagranPath %> && vagrant rsync' # --debug to get full logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment