-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (28 loc) · 845 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
var gulp = require("gulp")
var postcss = require("gulp-postcss")
var partialImport = require("postcss-partial-import")
var cssnext = require("postcss-cssnext")
var styleVariables = require("./src/styleVariables")
var mediaQueries = require("./src/mediaQueries")
gulp.task("css:build", function() {
var processors = [
partialImport(),
cssnext({
browsers: ["> 1%"],
features: {
customProperties: {
variables: styleVariables,
},
customMedia: {
extensions: mediaQueries,
}
}
})
]
return gulp.src("./src/main.css")
.pipe(postcss(processors))
.pipe(gulp.dest("./css"))
})
gulp.task("default", function() {
gulp.watch("./src/**/*.css", ["css:build"])
})