diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-03-29 09:54:51 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-03-29 09:54:51 +0300 |
| commit | 7d1f357a5e263567707b8f018da17f74c44c6d50 (patch) | |
| tree | faefd91113c180f3591002a8fdf291dbfdf6e692 /gulpfile.js | |
| parent | d2ea17abf815b6cd754511e27f4853045e0b3ca2 (diff) | |
| download | the-epube-ts.tar.gz the-epube-ts.tar.xz | |
horrors of ts ts
Diffstat (limited to 'gulpfile.js')
| -rw-r--r-- | gulpfile.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gulpfile.js b/gulpfile.js index ba113ad..e98d011 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,6 +7,9 @@ const rename = require('gulp-rename'); const uglify = require('gulp-uglify-es').default; const touch = require('gulp-touch-fd'); +const ts = require("gulp-typescript"); +const tsProject = ts.createProject("tsconfig.json"); + function swallowError(error) { console.log(error.toString()) @@ -35,12 +38,15 @@ gulp.task('minifyLibsJS', function(cb) { }); gulp.task('minifyJS', function(cb) { - gulp - .src(['js/*.js']) + tsProject + .src() + .pipe(tsProject()) + .on('error', swallowError) + .js + .pipe(gulp.dest("dist")) .pipe(concat('app.min.js')) .pipe(uglify()) .on('error', swallowError) - .pipe(gulp.dest('dist/')); cb(); }); @@ -73,7 +79,7 @@ gulp.task( gulp.series(['minifyCSS', 'minifyJS', 'minifyLibsJS'])(); gulp.watch(['lib/**/*.js', 'lib/*.js', 'node_modules/**/.js'], gulp.series('minifyLibsJS')); - gulp.watch(['js/*.js'], gulp.series('minifyJS')); + gulp.watch(['src/*.ts'], gulp.series('minifyJS')); gulp.watch(['css/*.less'], gulp.series('minifyCSS')); cb(); |
