stackviz/gulp/tasks/styles.js
Tim Buckley 0034283601 Add initial Angular boilerplate files.
Adds boilerplate files from `angularjs-gulp-browserify-boilerplate`
to start work on Angular rewrite of the frontend.

Change-Id: I54392c24f397496582f9d06d561d5c14a92ccbe6
2015-09-25 16:26:44 -06:00

24 lines
737 B
JavaScript

'use strict';
var config = require('../config');
var gulp = require('gulp');
var sass = require('gulp-sass');
var gulpif = require('gulp-if');
var handleErrors = require('../util/handleErrors');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
gulp.task('styles', function () {
return gulp.src(config.styles.src)
.pipe(sass({
sourceComments: global.isProd ? 'none' : 'map',
sourceMap: 'sass',
outputStyle: global.isProd ? 'compressed' : 'nested'
}))
.pipe(autoprefixer("last 2 versions", "> 1%", "ie 8"))
.on('error', handleErrors)
.pipe(gulp.dest(config.styles.dest))
.pipe(browserSync.reload({ stream: true }));
});