Skip to content

Instantly share code, notes, and snippets.

@mealeyst
Last active August 29, 2015 14:21
Show Gist options
  • Save mealeyst/3f5063f02c9c49a81384 to your computer and use it in GitHub Desktop.
Save mealeyst/3f5063f02c9c49a81384 to your computer and use it in GitHub Desktop.
Gulpfile for Wordpress Theme
var gulp = require('gulp'),
sass = require('gulp-sass'),
map = require('gulp-sourcemaps'),
library = 'library';
gulp.task('styles:compile', function(){
return gulp.src(library+'/scss/**/*.scss')
.pipe(map.init())
.pipe(sass({
errLogToConsole: true,
}))
.pipe(map.write())
.pipe(gulp.dest(library+'/css'));
});
//This works now
gulp.task('watch', ['compile'], function(){
gulp.watch(library+'/scss/**/*.scss', ['styles:compile']);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment