the-honk/euler/gulpfile.js

20 lines
538 B
JavaScript
Raw Normal View History

2021-10-29 00:00:43 +00:00
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 => {
2021-10-29 10:18:53 +00:00
path.basename = path.basename.split('-')[0].trim();
2021-10-29 00:00:43 +00:00
})
)
.pipe(gulp.dest('build'));
});