aboutsummaryrefslogtreecommitdiff
path: root/tools/tasks/build.sass.dev.ts
blob: a2127be537a32cd611cd928659427d14ec5b2421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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({
                // config_file: './config.rb',
                style: 'compressed',
                css: 'app/assets/css',
                sass: join(APP_SRC, 'assets/sass'),
            }))
            .pipe(gulp.dest(join(APP_SRC, 'assets')));
    };
}