-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
39 lines (31 loc) · 989 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
39
const gulp = require('gulp');
const { series } = require('gulp');
const cleanCSS = require('gulp-clean-css');
const concatCss = require('gulp-concat-css');
const concat = require('gulp-concat');
const terser = require('gulp-terser');
function concatJS(){
return gulp.src('./applications/**/*.js')
.pipe(concat('app-toolkit.js'))
.pipe(gulp.dest('./dist'));
}
function copySVG(){
return gulp.src('./applications/**/*.svg')
.pipe(gulp.dest('docs/svg/'));
}
function minifyJS(){
return gulp.src('./dist/app-toolkit.js')
.pipe(terser())
.pipe(gulp.dest('docs/js/'));
}
function concatCSS() {
return gulp.src('applications/**/*.css')
.pipe(concatCss("app-toolkit.css"))
.pipe(gulp.dest('docs/css/'));
}
function minifyCSS() {
return gulp.src('docs/css/app-toolkit.css')
.pipe(cleanCSS({ compatibility: 'ie8' }))
.pipe(gulp.dest('docs/css'));
}
exports.default = series(concatCSS, minifyCSS, concatJS, minifyJS, copySVG);