Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var gulp = require('gulp');
- var sass = require('gulp-sass');
- var sourcemaps = require('gulp-sourcemaps');
- var config = {
- sassPath: './src/sass/',
- bowerDir: './bower_components',
- autoprefixer: {
- cascade: true
- },
- paths: {
- output: 'dist/'
- }
- }
- //TODO:
- //if(/prod/.test(env)) {
- // config.sass.outputStyle = 'compressed';
- //}
- gulp.task('sass', function() {
- gulp.src(config.sassPath + '**/*.scss')
- .pipe(sourcemaps.init())
- .pipe(sass({
- style: 'expanded',
- includePaths: [
- config.sassPath,
- config.bowerDir + '/bootstrap-sass-official/assets/stylesheets',
- ],
- errLogToConsole: true }))
- //.pipe(autoprefixer(config.autoprefixer))
- .pipe(sourcemaps.write('./maps'))
- .pipe(gulp.dest(config.paths.output))
- });
- // Rerun the task when a file changes
- gulp.task('watch', function() {
- gulp.watch(config.sassPath + '/**/*.scss', ['sass']);
- });
- gulp.task('default', ['sass']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement