about summary refs log tree commit diff stats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-03-22 11:37:34 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-03-22 11:37:34 +0300
commit254bc97e737a568cb23fbbcb773f0dfb8894b9ff (patch)
tree850c6dceda07214248c3bfa2bf3bf0e15fa3e329 /gulpfile.js
parent6c991424547b149b3cac70a94a4e14f3661908a6 (diff)
downloadthe-epube-typescript-native.tar.gz
the-epube-typescript-native.tar.xz
wip typescript stuff typescript-native
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/gulpfile.js b/gulpfile.js
index ba113ad..1374d82 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())
 
@@ -34,12 +37,13 @@ gulp.task('minifyLibsJS', function(cb) {
 		cb();
 });
 
-gulp.task('minifyJS', function(cb) {
-	gulp
-		.src(['js/*.js'])
+gulp.task('minifyTS', function(cb) {
+	tsProject
+		.src()
+		.pipe(tsProject()).js
 		.pipe(concat('app.min.js'))
-		.pipe(uglify())
-		.on('error', swallowError)
+		//.pipe(uglify())
+		//.on('error', swallowError)
 		.pipe(gulp.dest('dist/'));
 
 		cb();
@@ -70,10 +74,10 @@ gulp.task('minifyCSS', function(cb) {
 gulp.task(
   'default',
   function(cb) {
-		gulp.series(['minifyCSS', 'minifyJS', 'minifyLibsJS'])();
+		gulp.series(['minifyCSS', 'minifyTS', '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('minifyTS'));
 		gulp.watch(['css/*.less'], gulp.series('minifyCSS'));
 
     cb();