Permalink
Browse files

Add a gulpfile for integration

  • Loading branch information...
1 parent 910beaa commit 7d91ccfe9b6a6781fbb2b8d21777448a1fb96199 @Fantomas42 committed May 21, 2014
Showing with 38 additions and 0 deletions.
  1. +38 −0 gulpfile.js
View
@@ -0,0 +1,38 @@
+var gulp = require('gulp'),
+ sass = require('gulp-sass'),
+ prefix = require('gulp-autoprefixer'),
+ livereload = require('gulp-livereload');
+
+var HTML = 'zinnia/templates/**/*.html',
+ IMG = 'zinnia/static/zinnia/img/*',
+ JS = 'zinnia/static/zinnia/js/**/*.js',
+ SASS = 'zinnia/static/zinnia/sass/**/*.scss',
+ CSS = 'zinnia/static/zinnia/css/*.css';
+
+
+gulp.task('sass', function() {
+
+ return gulp.src(SASS)
+ .pipe(sass({errLogToConsole: true}))
+ .pipe(prefix())
+ .pipe(gulp.dest('zinnia/static/zinnia/css'));
+});
+
+gulp.task('watch', function() {
+
+ var server = livereload();
+
+ gulp.watch([CSS, JS, IMG], function(file) {
+ server.changed(file.path);
+ });
+
+ gulp.watch(HTML, function(file) {
+ server.changed('.');
+ });
+
+ gulp.watch(SASS, ['sass']);
+
+});
+
+
+gulp.task('default', ['sass', 'watch']);

0 comments on commit 7d91ccf

Please sign in to comment.