Last active
March 24, 2016 16:20
-
-
Save reimertz/85589e69781f9d6d5a4a to your computer and use it in GitHub Desktop.
gulp + metalsmith
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
gulp.task('pre-build', ['metalsmith']); | |
gulp.task('post-build', ['bower-files', 'image-files']); | |
gulp.task('build', function(callback) { | |
runSequence('pre-build', 'post-build', callback); | |
}); | |
gulp.task('reload', ['build'], function() { | |
return browserSync.reload(); | |
}); | |
gulp.task('serve', ['build'], function() { | |
return browserSync({ | |
open: false, | |
notify: false, | |
server: { | |
baseDir: './.build' | |
} | |
}); | |
}); | |
gulp.task('watch', function() { | |
return gulp.watch( | |
['./src/templates/**/*', | |
'./src/**/*', | |
'./src/templates/**/**/*', | |
'./src/**/**/*', | |
'./src/templates/**/**/**/*', | |
'./src/**/**/**/*'], ['reload']); | |
}); | |
gulp.task('default', ['serve', 'watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment