ws4kp/gulp/update-vendor.js

27 lines
734 B
JavaScript
Raw Normal View History

const gulp = require('gulp');
const del = require('del');
const rename = require('gulp-rename');
const clean = (cb) => {
del(['./server/scripts/vendor/auto/**']);
cb();
};
const vendor_files = [
'./node_modules/luxon/build/global/luxon.js',
'./node_modules/nosleep.js/dist/NoSleep.js',
'./node_modules/jquery/dist/jquery.js',
'./node_modules/suncalc/suncalc.js',
2020-10-16 20:52:56 +00:00
'./node_modules/swiped-events/src/swiped-events.js',
];
const copy = () => gulp.src(vendor_files)
.pipe(rename((path) => {
path.dirname = path.dirname.toLowerCase();
path.basename = path.basename.toLowerCase();
path.extname = path.extname.toLowerCase();
}))
.pipe(gulp.dest('./server/scripts/vendor/auto'));
module.exports = gulp.series(clean, copy);