forked from Honatas/bootstrap-4-autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 lines (27 loc) · 762 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
const { src, dest, series } = require('gulp');
const del = require('del');
const rename = require('gulp-rename');
const typescript = require('gulp-typescript');
const uglify = require('gulp-uglify');
const target = 'dist';
var tsProject = typescript.createProject('tsconfig.json');
function clean() {
return del([target]);
}
function compile() {
const compiled = tsProject.src().pipe(tsProject());
compiled.dts.pipe(dest(target));
return compiled.js.pipe(dest(target));
}
function min() {
return src(target + '/bootstrap-4-autocomplete.js')
.pipe(uglify())
.pipe(rename('bootstrap-4-autocomplete.min.js'))
.pipe(dest(target));
}
const build = series(
clean,
compile,
min
);
exports.default = build;