-
Notifications
You must be signed in to change notification settings - Fork 5
/
gulpfile.js
38 lines (34 loc) · 946 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');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
var postcss_import = require('postcss-import');
var postcss_nested = require('postcss-nested');
var postcss_simple_vars = require('postcss-simple-vars');
var cssNano = require('cssnano');
gulp.task('css', function() {
var plugins = [
postcss_import,
postcss_nested,
postcss_simple_vars,
autoprefixer
];
return gulp.src('postcss/gorbeh-icons.css')
.pipe(postcss(plugins))
.pipe(gulp.dest('css'));
});
gulp.task('cssNano', function() {
var plugins = [
postcss_import,
postcss_simple_vars,
postcss_nested,
cssNano
];
return gulp.src('postcss/gorbeh-icons.min.css')
.pipe(postcss(plugins))
.pipe(gulp.dest('css'));
});
// default gulp task
gulp.task('default', ['css', 'cssNano'], function() {
// watch for CSS changes
gulp.watch('./postcss/*.css', ["css"]);
});