Create 3rd party libraries with node instead of Python.

This commit is contained in:
2019-03-22 14:26:44 +01:00
parent b164de08a5
commit 8c43840572
11 changed files with 27026 additions and 16225 deletions
+35 -4
View File
@@ -1,14 +1,45 @@
const {src, dest, parallel} = require('gulp');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
const concat = require('gulp-concat');
function minify() {
function vendors() {
return src([
'dist/iwmlib.3rdparty.js'
'./lib/3rdparty/jquery.js',
'./lib/3rdparty/optimal-select.js',
'./lib/3rdparty/hammer.js',
'./lib/3rdparty/hammer.propagating.js',
'./lib/3rdparty/d3/d3.js',
'./lib/3rdparty/d3/d3-selection-multi.js',
'./lib/3rdparty/highlight/**/*.js',
'./lib/3rdparty/pixi/pixi.js',
'./lib/3rdparty/pixi/lib/crn_decomp.js',
'./lib/3rdparty/pixi/pixi-compressed-textures.js',
'./lib/3rdparty/pixi/pixi-filters.js',
'./lib/3rdparty/pixi/pixi-particles.js',
'./lib/3rdparty/pixi/pixi-projection.js',
'./lib/3rdparty/greensock/src/uncompressed/**/*.js',
'./lib/3rdparty/convertPointFromPageToNode.js',
], {sourcemaps: false})
.pipe(concat('iwmlib.3rdparty.js'))
.pipe(dest('dist', {sourcemaps: false}))
.pipe(rename({extname: '.min.js'}))
.pipe(uglify())
.pipe(dest('dist'))
.pipe(dest('dist', {sourcemaps: false}))
}
exports.default = parallel(minify);
function preload() {
return src([
'./lib/3rdparty/highlight/**/*.js',
'./lib/3rdparty/greensock/src/uncompressed/plugins/*.js',
'./lib/3rdparty/greensock/src/uncompressed/TweenLite.js',
'./lib/3rdparty/convertPointFromPageToNode.js',
], {sourcemaps: false})
.pipe(concat('iwmlib.3rdparty.preload.js'))
.pipe(dest('dist', {sourcemaps: false}))
.pipe(rename({extname: '.min.js'}))
.pipe(uglify())
.pipe(dest('dist', {sourcemaps: false}))
}
exports.default = parallel(vendors, preload);