audio-vis/build/task/worker.js
2020-08-06 23:44:37 +02:00

27 lines
659 B
JavaScript

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;