citra-emu
/
citra-web
Archived
1
0
Fork 0

gulpfile: parallel image processing

This commit is contained in:
liushuyu 2023-02-03 00:33:31 -07:00
parent 8e9b406e71
commit 56a127fc29
3 changed files with 8 additions and 2 deletions

View File

@ -1,12 +1,12 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
const gulp = require('gulp'); const gulp = require('gulp');
const fs = require('fs'); const fs = require('fs');
const merge = require('merge-stream');
const exec = require('child_process').exec; const exec = require('child_process').exec;
const log = require('fancy-log'); const log = require('fancy-log');
const parseArgs = require('minimist'); const parseArgs = require('minimist');
const browserSync = require('browser-sync').create(); const browserSync = require('browser-sync').create();
const concat = require('gulp-concat'); const concat = require('gulp-concat');
const parallel = require('concurrent-transform');
const imageResize = require('gulp-image-resize'); const imageResize = require('gulp-image-resize');
gulp.task('scripts:games', function (callback) { gulp.task('scripts:games', function (callback) {
@ -40,7 +40,7 @@ gulp.task('assets:images', function() {
.pipe(imageResize({ width: 400, height: 240, crop: false })) .pipe(imageResize({ width: 400, height: 240, crop: false }))
.pipe(gulp.dest('build/images/screenshots/thumbs')); .pipe(gulp.dest('build/images/screenshots/thumbs'));
return merge(baseImages, jumbotronImages, bannerImages, boxartImages, iconImages, screenshotImages); return parallel(baseImages, jumbotronImages, bannerImages, boxartImages, iconImages, screenshotImages);
}); });
gulp.task('assets:js', function() { gulp.task('assets:js', function() {

View File

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"bootstrap-sass": "^3.4.3", "bootstrap-sass": "^3.4.3",
"browser-sync": "^2.27.11", "browser-sync": "^2.27.11",
"concurrent-transform": "^1.0.0",
"cssnano": "^5.1.14", "cssnano": "^5.1.14",
"fancy-log": "^2.0.0", "fancy-log": "^2.0.0",
"gulp": "^4.0.2", "gulp": "^4.0.2",

View File

@ -825,6 +825,11 @@ concat-with-sourcemaps@^1.0.0:
dependencies: dependencies:
source-map "^0.6.1" source-map "^0.6.1"
concurrent-transform@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/concurrent-transform/-/concurrent-transform-1.0.0.tgz#7a0fdea2f8096239487fdb0addb5edaa7f596f6c"
integrity sha512-k/b+CZJbUQW7A/51ZGFc/bQAbGpUuitvhK0hJi/9vJ7l3QBp5Kib+kSaNnrItDTFLx4pYJqCfN95FTuLUFaZGQ==
config-chain@^1.1.11: config-chain@^1.1.11:
version "1.1.13" version "1.1.13"
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4"