const terser = require('gulp-terser'), concat = require('gulp-concat'), rename = require('gulp-rename'), gulp = require('gulp'); const basePath = __dirname + '/../../raw/worker/'; const config = { src: [ basePath + 'eventHandler.js', basePath + 'database.js', basePath + 'id3.js', basePath + 'app.js', ], dest: __dirname + '/../../out/js' }; function build() { return gulp.src(config.src) .pipe(concat('worker.js')) .pipe(gulp.dest(config.dest)) .pipe(rename('worker.min.js')) .pipe(terser()) .pipe(gulp.dest(config.dest)); } module.exports.build = build;