-
Notifications
You must be signed in to change notification settings - Fork 32
/
gulpfile.js
35 lines (29 loc) · 851 Bytes
/
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
'use strict'
var gulp = require('gulp')
var sass = require('gulp-sass')
var concat = require('gulp-concat')
var postcss = require('gulp-postcss')
var autoprefixer = require('autoprefixer')
var merge = require('merge-stream')
var stylesheets = require('./stylesheets/index.gulp')
gulp.task('style', function () {
var sassStream = gulp.src(stylesheets, {cwd: '.'})
.pipe(
sass({
indentedSyntax: true,
includePaths: ['./stylesheets']
}).on('error', sass.logError)
)
var cssStream = gulp.src('node_modules/sanitize.css/sanitize.css')
return merge(cssStream, sassStream)
.pipe(concat('app.css'))
.pipe(postcss([
autoprefixer({
browsers: ['last 2 versions']
})
]))
.pipe(gulp.dest('./css'))
})
gulp.task('style:watch', function () {
gulp.watch(stylesheets, ['style'])
})