Skip to content

Instantly share code, notes, and snippets.

@4gray
Created December 30, 2017 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4gray/cfa42eebdccb65432a216fac8a056698 to your computer and use it in GitHub Desktop.
Save 4gray/cfa42eebdccb65432a216fac8a056698 to your computer and use it in GitHub Desktop.
Gulp: Sync folders
var gulp = require('gulp');
gulp.task('watch', function() {
return gulp.watch('./source/**/*', function(obj){
if( obj.type === 'changed') {
gulp.src( obj.path, { "base": "./source/"})
.pipe(gulp.dest('./dest'));
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment