/** * @file gulpfile.js * * Provides gulp tasks for building theme components. */ 'use strict'; var gulp = require('gulp'), sass = require('gulp-sass'), prefix = require('gulp-autoprefixer'), sourcemaps = require('gulp-sourcemaps'); /** * @task sass * * Compile css from scss. */ gulp.task('sass', function () { return gulp.src('sass/**/*.scss') .pipe(sourcemaps.init()) .pipe(sass({ // Include the bootstrap library. //includePaths: ['./node_modules/bootstrap-sass/assets/stylesheets'] })) .pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true })) .pipe(sourcemaps.write('')) .pipe(gulp.dest('css')); }); /** * @task watch * * Watch scss files for changes & recompile. */ gulp.task('watch', function () { gulp.watch(['sass/*.scss', 'sass/**/*.scss'], ['sass']); }); /** * @task default * * Default task, running just `gulp` will * compile & watch files. */ gulp.task('default', ['sass', 'watch']);