-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (33 loc) · 896 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
36
37
38
var gulp = require('gulp'),
postcss = require('gulp-postcss'),
cssnext = require('postcss-cssnext'),
rename = require("gulp-rename"),
simpleGrid = require('postcss-simple-grid'),
easyImport = require('postcss-easy-import'),
connect = require('gulp-connect');
//CSS
gulp.task('css', function () {
var processors = [
easyImport,
simpleGrid({separator: ['--']}),
cssnext({browsers: ['last 1 version']})
];
return gulp.src('./src/_*.css')
.pipe(postcss(processors))
.pipe(rename("./css/main.css"))
.pipe(gulp.dest('./'));
});
//Rename
//Server
gulp.task('connect', function() {
connect.server({
root: './',
port: 4000,
livereload: true
});
});
//Watch
gulp.task('watch', function() {
gulp.watch(['./src/**/_*.css'], ['css']);
});
gulp.task('default', ['css', 'connect', 'watch'], function() {});