the-honk/euler/gulpfile.js
2024-10-09 18:02:36 +01:00

19 lines
538 B
JavaScript

const gulp = require('gulp');
const typescript = require('gulp-typescript');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
gulp.task('build', () => {
const tsc = typescript.createProject('tsconfig.json');
return gulp
.src('src/**/*.ts')
.pipe(tsc())
.pipe(uglify({ mangle: { toplevel: true } }))
.pipe(
rename(path => {
path.basename = path.basename.split('-')[0].trim();
})
)
.pipe(gulp.dest('build'));
});