-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
30 lines (26 loc) · 1.15 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
const gulp = require('gulp');
const uglify = require('gulp-uglify');
const babel = require('gulp-babel');
const ts = require('gulp-typescript');
const tsProject = ts.createProject('./tsconfig.json');
const tiny = require('./dist/index');
exports.default = () => {
tsProject.src().pipe(tsProject()).js
.pipe(gulp.dest('./dist'))
.pipe(babel())
.pipe(uglify())
.pipe(gulp.dest('./dist'));
return gulp.watch('./src/**/*.ts', () => tsProject.src().pipe(tsProject()).js
.pipe(gulp.dest('./dist'))
.pipe(babel())
.pipe(uglify())
.pipe(gulp.dest('./dist')));
}
exports.tiny = () => gulp.src('./test/*')
.pipe(tiny({
// key: 'tiny key',
// key: 'imagemin',
// verbose: true,
// jsonDest: './src/',
// tinyTag: '-ttt'
})).pipe(gulp.dest('./test/tinied'));