Skip to content

Instantly share code, notes, and snippets.

@shawnhansen
Created January 21, 2015 17:13
Show Gist options
  • Save shawnhansen/7976d9baa5573408981c to your computer and use it in GitHub Desktop.
Save shawnhansen/7976d9baa5573408981c to your computer and use it in GitHub Desktop.
Gulpfile for Plone Diazo sites using bootstrap.
var gulp = require('gulp');
var uglify = require('gulp-uglifyjs');
var less = require('gulp-less');
// Default
gulp.task('default', ['styles', 'scripts', 'watch']);
// Scripts Task
gulp.task('scripts', function() {
gulp.src(['bower_components/bootstrap/dist/js/bootstrap.js','js/site.js'])
.pipe(uglify('site.min.js'))
.pipe(gulp.dest('js'))
});
// Styles Task
gulp.task('styles', function() {
gulp.src('src-less/*.less')
.pipe(less({
style: 'compressed'
}))
.pipe(gulp.dest('css'))
});
// Watch
gulp.task('watch', function() {
gulp.watch('js/*.js', ['scripts']);
gulp.watch('src-less/*.less', ['styles']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment