about summary refs log tree commit diff stats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-03-29 09:54:51 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-03-29 09:54:51 +0300
commit7d1f357a5e263567707b8f018da17f74c44c6d50 (patch)
treefaefd91113c180f3591002a8fdf291dbfdf6e692 /gulpfile.js
parentd2ea17abf815b6cd754511e27f4853045e0b3ca2 (diff)
downloadthe-epube-ts.tar.gz
the-epube-ts.tar.xz
horrors of ts ts
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js14
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();