denolfe
4/14/2015 - 10:31 PM

gulp + metalsmith

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']);