Use gulp.parallel instead of gulp-multi-process

This commit is contained in:
Ivan Demchuk 2020-06-13 21:44:00 +03:00
parent 8186da9d4c
commit fc571e2c3e
6 changed files with 17 additions and 75 deletions

View File

@ -250,16 +250,18 @@ gulp.task(
// Builds everything (staging)
gulp.task("step.staging.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.staging"));
gulp.task("step.staging.mainbuild", cb =>
$.multiProcess(["utils.copyAdditionalBuildFiles", "step.baseResources", "step.staging.code"], cb, false)
gulp.task(
"step.staging.mainbuild",
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.staging.code")
);
gulp.task("step.staging.all", gulp.series("step.staging.mainbuild", "css.prod", "html.staging"));
gulp.task("build.staging", gulp.series("utils.cleanup", "step.staging.all", "step.postbuild"));
// Builds everything (prod)
gulp.task("step.prod.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.prod"));
gulp.task("step.prod.mainbuild", cb =>
$.multiProcess(["utils.copyAdditionalBuildFiles", "step.baseResources", "step.prod.code"], cb, false)
gulp.task(
"step.prod.mainbuild",
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.prod.code")
);
gulp.task("step.prod.all", gulp.series("step.prod.mainbuild", "css.prod", "html.prod"));
gulp.task("build.prod", gulp.series("utils.cleanup", "step.prod.all", "step.postbuild"));
@ -269,9 +271,7 @@ gulp.task(
"step.standalone-beta.code",
gulp.series("sounds.fullbuild", "translations.fullBuild", "js.standalone-beta")
);
gulp.task("step.standalone-beta.mainbuild", cb =>
$.multiProcess(["step.baseResources", "step.standalone-beta.code"], cb, false)
);
gulp.task("step.standalone-beta.mainbuild", gulp.parallel("step.baseResources", "step.standalone-beta.code"));
gulp.task(
"step.standalone-beta.all",
gulp.series("step.standalone-beta.mainbuild", "css.prod-standalone", "html.standalone-beta")
@ -286,9 +286,7 @@ gulp.task(
"step.standalone-prod.code",
gulp.series("sounds.fullbuild", "translations.fullBuild", "js.standalone-prod")
);
gulp.task("step.standalone-prod.mainbuild", cb =>
$.multiProcess(["step.baseResources", "step.standalone-prod.code"], cb, false)
);
gulp.task("step.standalone-prod.mainbuild", gulp.parallel("step.baseResources", "step.standalone-prod.code"));
gulp.task(
"step.standalone-prod.all",
gulp.series("step.standalone-prod.mainbuild", "css.prod-standalone", "html.standalone-prod")

View File

@ -116,11 +116,12 @@ function gulptasksImageResources($, gulp, buildFolder) {
});
// Copies all resources and optimizes them
gulp.task("imgres.allOptimized", cb =>
$.multiProcess(
["imgres.atlasOptimized", "imgres.copyNonImageResources", "imgres.copyImageResourcesOptimized"],
cb,
false
gulp.task(
"imgres.allOptimized",
gulp.parallel(
"imgres.atlasOptimized",
"imgres.copyNonImageResources",
"imgres.copyImageResourcesOptimized"
)
);

View File

@ -68,7 +68,7 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
)
.pipe(gulp.dest(buildFolder));
});
gulp.task("js.staging", cb => $.multiProcess(["js.staging.transpiled", "js.staging.latest"], cb, false));
gulp.task("js.staging", gulp.parallel("js.staging.transpiled", "js.staging.latest"));
//// PROD
gulp.task("js.prod.transpiled", () => {
@ -104,7 +104,7 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
.pipe(browserSync.stream());
});
gulp.task("js.prod", cb => $.multiProcess(["js.prod.transpiled", "js.prod.latest"], cb, false));
gulp.task("js.prod", gulp.parallel("js.prod.transpiled", "js.prod.latest"));
//// STANDALONE

View File

@ -88,7 +88,6 @@
"gulp-javascript-obfuscator": "^1.1.5",
"gulp-jsbeautifier": "^3.0.0",
"gulp-load-plugins": "^2.0.3",
"gulp-multi-process": "^1.3.1",
"gulp-phonegap-build": "^0.1.5",
"gulp-plumber": "^1.2.1",
"gulp-pngquant": "^1.0.13",

View File

@ -90,7 +90,7 @@ function gulptasksSounds($, gulp, buildFolder) {
.pipe(gulp.dest(path.join(buildFolder, "res", "sounds")));
});
gulp.task("sounds.buildall", cb => $.multiProcess(["sounds.music", "sounds.sfx"], cb, true));
gulp.task("sounds.buildall", gulp.parallel("sounds.music", "sounds.sfx"));
gulp.task("sounds.fullbuild", gulp.series("sounds.clear", "sounds.buildall", "sounds.copy"));
gulp.task("sounds.dev", gulp.series("sounds.buildall", "sounds.copy"));

View File

@ -1860,55 +1860,6 @@ async-settle@^1.0.0:
dependencies:
async-done "^1.2.2"
async.queue@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.queue/-/async.queue-0.5.2.tgz#8d5d90812e1481066bc0904e8cc1712b17c3bd7c"
integrity sha1-jV2QgS4UgQZrwJBOjMFxKxfDvXw=
dependencies:
async.util.queue "0.5.2"
async.util.arrayeach@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.util.arrayeach/-/async.util.arrayeach-0.5.2.tgz#58c4e98028d55d69bfb05aeb3af44e0a555a829c"
integrity sha1-WMTpgCjVXWm/sFrrOvROClVagpw=
async.util.isarray@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.util.isarray/-/async.util.isarray-0.5.2.tgz#e62dac8f2636f65875dcf7521c2d24d0dfb2bbdf"
integrity sha1-5i2sjyY29lh13PdSHC0k0N+yu98=
async.util.map@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.util.map/-/async.util.map-0.5.2.tgz#e588ef86e0b3ab5f027d97af4d6835d055ca69d6"
integrity sha1-5YjvhuCzq18CfZevTWg10FXKadY=
async.util.noop@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.util.noop/-/async.util.noop-0.5.2.tgz#bdd62b97cb0aa3f60b586ad148468698975e58b9"
integrity sha1-vdYrl8sKo/YLWGrRSEaGmJdeWLk=
async.util.onlyonce@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.util.onlyonce/-/async.util.onlyonce-0.5.2.tgz#b8e6fc004adc923164d79e32f2813ee465c24ff2"
integrity sha1-uOb8AErckjFk154y8oE+5GXCT/I=
async.util.queue@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.util.queue/-/async.util.queue-0.5.2.tgz#57f65abe1a3cdf273d31abd28ab95425f8222ee5"
integrity sha1-V/Zavho83yc9MavSirlUJfgiLuU=
dependencies:
async.util.arrayeach "0.5.2"
async.util.isarray "0.5.2"
async.util.map "0.5.2"
async.util.noop "0.5.2"
async.util.onlyonce "0.5.2"
async.util.setimmediate "0.5.2"
async.util.setimmediate@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/async.util.setimmediate/-/async.util.setimmediate-0.5.2.tgz#2812ebabf2a58027758d4bc7793d1ccfaf10255f"
integrity sha1-KBLrq/KlgCd1jUvHeT0cz68QJV8=
async@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
@ -6256,13 +6207,6 @@ gulp-match@^1.1.0:
dependencies:
minimatch "^3.0.3"
gulp-multi-process@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/gulp-multi-process/-/gulp-multi-process-1.3.1.tgz#e12aa818e4c234357ad99d5caff8df8a18f46e9e"
integrity sha512-okxYy3mxUkekM0RNjkBg8OPuzpnD2yXMAdnGOaQPSJ2wzBdE9R9pkTV+tzPZ65ORK7b57YUc6s+gROA4+EIOLg==
dependencies:
async.queue "^0.5.2"
gulp-phonegap-build@^0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/gulp-phonegap-build/-/gulp-phonegap-build-0.1.5.tgz#36c145e63cd204702be0f3b99be19e096712bcaf"