Skip to content

Instantly share code, notes, and snippets.

@reimertz
Last active March 24, 2016 16:20
Show Gist options
  • Save reimertz/85589e69781f9d6d5a4a to your computer and use it in GitHub Desktop.
Save reimertz/85589e69781f9d6d5a4a to your computer and use it in GitHub Desktop.
gulp + metalsmith
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