mirror of
https://github.com/danbulant/node-html-parser
synced 2026-05-19 04:18:52 +00:00
add umd task
This commit is contained in:
parent
9fcf7fe361
commit
9527f945e8
1 changed files with 12 additions and 1 deletions
13
gulpfile.js
13
gulpfile.js
|
|
@ -14,6 +14,17 @@ gulp.task('compile-ts', () => {
|
|||
.pipe(gulp.dest(dest));
|
||||
});
|
||||
|
||||
gulp.task('compile-ts-umd', () => {
|
||||
const ts = require('gulp-typescript');
|
||||
const tsProject = ts.createProject('./tsconfig.json');
|
||||
const path = require('path');
|
||||
const dest = path.join(tsProject.options.outDir, 'umd');
|
||||
tsProject.options.module = 3;
|
||||
return tsProject.src()
|
||||
.pipe(tsProject())
|
||||
.pipe(gulp.dest(dest));
|
||||
});
|
||||
|
||||
gulp.task('watch-ts', async () => {
|
||||
const ts = require('gulp-typescript');
|
||||
const tsProject = ts.createProject('./tsconfig.json');
|
||||
|
|
@ -35,7 +46,7 @@ gulp.task('watch-ts', async () => {
|
|||
|
||||
gulp.task('default', (cb) => {
|
||||
const sequence = require('gulp-sequence');
|
||||
sequence('clean', 'compile-ts', cb);
|
||||
sequence('clean', 'compile-ts', 'compile-ts-umd', cb);
|
||||
});
|
||||
|
||||
gulp.task('dev', ['watch-ts']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue