2020-04-07 21:44:46 +02:00
|
|
|
const terser = require('gulp-terser'),
|
|
|
|
concat = require('gulp-concat'),
|
|
|
|
rename = require('gulp-rename'),
|
|
|
|
gulp = require('gulp');
|
|
|
|
|
|
|
|
const basePath = __dirname + '/../../raw/javascript/';
|
|
|
|
const visualPath = basePath + 'visuals/';
|
|
|
|
const visuals = [
|
|
|
|
visualPath + 'sphere.js',
|
2020-08-01 21:51:54 +02:00
|
|
|
visualPath + 'wave.js',
|
2020-08-06 23:44:37 +02:00
|
|
|
visualPath + 'wave2d.js',
|
2020-08-01 21:51:54 +02:00
|
|
|
visualPath + 'water.js',
|
2020-04-07 21:44:46 +02:00
|
|
|
//visualPath + 'experimental.js',
|
|
|
|
]
|
|
|
|
const config = {
|
|
|
|
src: [
|
|
|
|
basePath + 'utils.js',
|
2020-08-05 11:24:59 +02:00
|
|
|
basePath + 'gl/glUtils.js',
|
2020-08-01 21:51:54 +02:00
|
|
|
basePath + 'template.js',
|
2020-08-05 11:24:59 +02:00
|
|
|
basePath + 'gl/handler.js',
|
2020-04-07 21:44:46 +02:00
|
|
|
basePath + 'audio.js',
|
2020-08-06 23:44:37 +02:00
|
|
|
basePath + 'FileHandler.js',
|
|
|
|
basePath + 'playerConfigHandler.js',
|
2020-04-07 21:44:46 +02:00
|
|
|
basePath + 'player.js',
|
|
|
|
basePath + 'gui.js',
|
|
|
|
basePath + 'visual.js',
|
2020-08-05 11:24:59 +02:00
|
|
|
basePath + 'imageUploader.js',
|
|
|
|
basePath + 'notification.js',
|
2020-08-01 21:51:54 +02:00
|
|
|
basePath + 'config.js',
|
2020-04-07 21:44:46 +02:00
|
|
|
...visuals,
|
2020-08-01 21:51:54 +02:00
|
|
|
basePath + 'eventHandler.js',
|
2020-08-06 23:44:37 +02:00
|
|
|
basePath + 'select.js',
|
|
|
|
basePath + 'startup.js',
|
2020-04-07 21:44:46 +02:00
|
|
|
basePath + 'app.js'
|
|
|
|
],
|
|
|
|
dest: __dirname + '/../../out/js'
|
|
|
|
};
|
|
|
|
|
|
|
|
function build() {
|
|
|
|
return gulp.src(config.src)
|
|
|
|
.pipe(concat('scripts.js'))
|
|
|
|
.pipe(gulp.dest(config.dest))
|
|
|
|
.pipe(rename('scripts.min.js'))
|
|
|
|
.pipe(terser())
|
|
|
|
.pipe(gulp.dest(config.dest));
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports.build = build;
|