Created
January 21, 2015 17:13
-
-
Save shawnhansen/7976d9baa5573408981c to your computer and use it in GitHub Desktop.
Gulpfile for Plone Diazo sites using bootstrap.
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
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