Browse Source

Linted gulpfile.

obersalzberg
Sebastian Kupke 1 year ago
parent
commit
78108c4090
1 changed files with 40 additions and 34 deletions
  1. +40
    -34
      gulpfile.js

+ 40
- 34
gulpfile.js View File

@ -1,45 +1,51 @@
const {src, dest, parallel} = require('gulp');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
const concat = require('gulp-concat');
const replace = require('gulp-replace');
const { src, dest, parallel } = require('gulp')
const uglify = require('gulp-uglify')
const rename = require('gulp-rename')
const concat = require('gulp-concat')
const replace = require('gulp-replace')
function vendors() {
return src([
'./node_modules/optimal-select/dist/optimal-select.js',
'./node_modules/hammerjs/hammer.js',
'./node_modules/propagating-hammerjs/propagating.js',
'./node_modules/pixi.js/dist/pixi.js',
'./node_modules/pixi-compressed-textures/lib/crn_decomp.js',
'./node_modules/pixi-compressed-textures/bin/pixi-compressed-textures.js',
'./node_modules/pixi-filters/dist/pixi-filters.js',
'./node_modules/pixi-particles/dist/pixi-particles.js',
'./node_modules/pixi-projection/dist/pixi-projection.js',
'./node_modules/gsap/src/uncompressed/TweenMax.js',
'./node_modules/gsap/src/uncompressed/TimelineMax.js',
'./lib/3rdparty/pixi-ease.js',
'./lib/3rdparty/pixi-viewport.js',
'./lib/3rdparty/convertPointFromPageToNode.js'
], {sourcemaps: false})
return src(
[
'./node_modules/optimal-select/dist/optimal-select.js',
'./node_modules/hammerjs/hammer.js',
'./node_modules/propagating-hammerjs/propagating.js',
'./node_modules/pixi.js/dist/pixi.js',
'./node_modules/pixi-compressed-textures/lib/crn_decomp.js',
'./node_modules/pixi-compressed-textures/bin/pixi-compressed-textures.js',
'./node_modules/pixi-filters/dist/pixi-filters.js',
'./node_modules/pixi-particles/dist/pixi-particles.js',
'./node_modules/pixi-projection/dist/pixi-projection.js',
'./node_modules/gsap/src/uncompressed/TweenMax.js',
'./node_modules/gsap/src/uncompressed/TimelineMax.js',
'./lib/3rdparty/pixi-ease.js',
'./lib/3rdparty/pixi-viewport.js',
'./lib/3rdparty/convertPointFromPageToNode.js'
],
{ sourcemaps: false }
)
.pipe(concat('iwmlib.3rdparty.js'))
.pipe(replace(/^\/\/# sourceMappingURL=.*$/gmi, ''))
.pipe(dest('dist', {sourcemaps: false}))
.pipe(rename({extname: '.min.js'}))
.pipe(replace(/^\/\/# sourceMappingURL=.*$/gim, ''))
.pipe(dest('dist', { sourcemaps: false }))
.pipe(rename({ extname: '.min.js' }))
.pipe(uglify())
.pipe(dest('dist', {sourcemaps: false}))
.pipe(dest('dist', { sourcemaps: false }))
}
function preload() {
return src([
'./node_modules/gsap/src/uncompressed/TweenMax.js',
'./lib/3rdparty/convertPointFromPageToNode.js',
], {sourcemaps: false})
return src(
[
'./node_modules/gsap/src/uncompressed/TweenMax.js',
'./lib/3rdparty/convertPointFromPageToNode.js'
],
{ sourcemaps: false }
)
.pipe(concat('iwmlib.3rdparty.preload.js'))
.pipe(replace(/^\/\/# sourceMappingURL=.*$/gmi, ''))
.pipe(dest('dist', {sourcemaps: false}))
.pipe(rename({extname: '.min.js'}))
.pipe(replace(/^\/\/# sourceMappingURL=.*$/gim, ''))
.pipe(dest('dist', { sourcemaps: false }))
.pipe(rename({ extname: '.min.js' }))
.pipe(uglify())
.pipe(dest('dist', {sourcemaps: false}))
.pipe(dest('dist', { sourcemaps: false }))
}
exports.default = parallel(vendors, preload);
exports.default = parallel(vendors, preload)

Loading…
Cancel
Save