aboutsummaryrefslogtreecommitdiff
path: root/tools/tasks/build.sass.dev.ts
blob: 086c306e0b90918330ad1bb97aa8683e3335bd04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {join} from 'path';
import {APP_SRC} from '../config';

export = function buildSassDev(gulp, plugins, option) {
    return function() {
        return gulp.src(join(APP_SRC, '**', '*.scss'))
            .pipe(plugins.plumber({
                // this allows gulp not to crash on sass compilation errors
                errorHandler: function(error) {
                    console.log(error.message);
                    this.emit('end');
                }
            }))
            .pipe(plugins.compass({
                style: 'compressed',
                css: 'app/assets/css',
                sass: join(APP_SRC, 'assets/sass')
            }))
            .pipe(gulp.dest(join(APP_SRC, 'assets')));
    };
}