sdc-build-wp 4.1.2 → 4.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +6 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -225,18 +225,16 @@ let builds = argv.builds ? argv.builds.split(',') : [
225
225
  })();
226
226
 
227
227
  async function frontrunImages() {
228
- for (var directory of globs.imageDirectories) {
229
- await buildImages(directory);
230
- }
228
+ const promisesImages = globs.imageDirectories.map(directory => buildImages(directory));
229
+ await Promise.all(promisesImages);
231
230
  }
232
231
 
233
232
  async function runBlocks(singleBlock) {
234
233
  if (singleBlock) {
235
234
  await buildBlock(singleBlock);
236
235
  } else {
237
- for (var block of globs.blocks) {
238
- await buildBlock(block);
239
- }
236
+ const promisesBlocks = globs.blocks.map(block => buildBlock(block));
237
+ await Promise.all(promisesBlocks);
240
238
  }
241
239
  }
242
240
 
@@ -255,9 +253,8 @@ async function runSass(singleEntry, buildTheme = true) {
255
253
  }
256
254
 
257
255
  async function runJS() {
258
- for (var block of filesJS) {
259
- await buildJS(block.file, block.name, globs.js);
260
- }
256
+ const promisesJS = filesJS.map(block => buildJS(block.file, block.name, globs.js));
257
+ await Promise.all(promisesJS);
261
258
  }
262
259
 
263
260
  async function runPHP(file, method) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdc-build-wp",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "Custom WordPress build process.",
5
5
  "engines": {
6
6
  "node": ">=20"