-
Notifications
You must be signed in to change notification settings - Fork 13
/
gulpfile.js
54 lines (48 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
/** Gulp file to create dist
*/
var gulp = require("gulp");
var autoprefixer = require('gulp-autoprefixer');
const concat = require('gulp-concat');
const cssmin = require('gulp-cssmin');
const bump = require('gulp-bump');
/** Autoprefix CSS + minification */
function css() {
return gulp
.src(['icss.css','./css/*.css'])
.pipe(autoprefixer('last 10 versions', 'ie 10'))
.pipe(concat('iconicss.css'))
.pipe(gulp.dest('./dist'));
};
function mincss() {
return gulp
.src(['icss.css','./css/*.css'])
.pipe(autoprefixer({
cascade: false
}))
.pipe(concat('iconicss.min.css'))
.pipe(cssmin())
.pipe(gulp.dest('./dist'));
};
/** Create a custom build using the custom dir */
function custom() {
return gulp
.src(['icss.css','./custom/*.css'])
.pipe(autoprefixer({
cascade: false
}))
.pipe(concat('myiconicss.css'))
.pipe(cssmin())
.pipe(gulp.dest('./dist'));
};
function dobump() {
return gulp
.src('./package.json')
.pipe(bump({type:'minor'}))
.pipe(gulp.dest('./'));
};
const build = gulp.series(gulp.parallel(css, mincss));
exports.css = css;
exports.mincss = mincss;
exports.custom = custom;
exports.dobump = dobump;
exports.default = build;