the-honk/euler/gulpfile.js
2021-11-01 19:56:04 +00: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'));
});