forked from fastworkco/turbine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
57 lines (52 loc) · 1.24 KB
/
Gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const gulp = require('gulp')
const sass = require('gulp-sass')
const autoprefixer = require('gulp-autoprefixer')
const rename = require('gulp-rename')
const sync = require('gulp-sync')(gulp).sync
const sassOption = {
outputStyle: 'compressed',
includePaths: 'node_modules'
}
gulp.task('default', gulp.series(atomic, turbine, component))
function atomic () {
return gulp
.src('./scss/atomic.scss')
.pipe(sass(sassOption).on('error', sass.logError))
.pipe(autoprefixer({overrideBrowserslist: ['last 2 versions']}))
.pipe(
rename({
basename: 'atomic',
suffix: '',
extname: '.css'
})
)
.pipe(gulp.dest('./dist/'))
}
function turbine () {
return gulp
.src('./scss/turbine.scss')
.pipe(sass(sassOption).on('error', sass.logError))
.pipe(autoprefixer({overrideBrowserslist: ['last 2 versions']}))
.pipe(
rename({
basename: 'turbine',
suffix: '',
extname: '.css'
})
)
.pipe(gulp.dest('./dist/'))
}
function component () {
return gulp
.src('./scss/component.scss')
.pipe(sass(sassOption).on('error', sass.logError))
.pipe(autoprefixer({overrideBrowserslist: ['last 2 versions']}))
.pipe(
rename({
basename: 'component',
suffix: '',
extname: '.css'
})
)
.pipe(gulp.dest('./dist/'))
}