sdc-build-wp 4.6.1 → 4.6.2

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.
@@ -87,7 +87,7 @@ export default class BlocksComponent extends BaseComponent {
87
87
  ...this.project.chokidarOpts
88
88
  }).on('all', (event, path) => {
89
89
  if (!['unlink', 'unlinkDir'].includes(event)) {
90
- this.process(path);
90
+ this.process(block);
91
91
  }
92
92
  });
93
93
  }
@@ -70,7 +70,7 @@ export default class ScriptsComponent extends BaseComponent {
70
70
  }
71
71
 
72
72
  async process() {
73
- const promisesScripts = this.files.map((block, index) => this.build(block.file, { entriesToLint: index == 0 ? this.globs : null }));
73
+ const promisesScripts = this.files.map((group, index) => this.build(group.file, { entriesToLint: index == 0 ? this.globs : null }));
74
74
  await Promise.all(promisesScripts);
75
75
  }
76
76
 
@@ -160,13 +160,13 @@ export default class StyleComponent extends BaseComponent {
160
160
  await this.buildTheme();
161
161
  }
162
162
  let i = 0;
163
- for (var block of this.files) {
164
- if (!entry || entry == block.file) {
165
- await this.build(block.file, {
166
- name: block.name,
163
+ for (let group of this.files) {
164
+ if (!entry || entry == group.file) {
165
+ await this.build(group.file, {
166
+ name: group.name,
167
167
  entriesToLint: i == 0 ? this.globs : null
168
168
  });
169
- if (entry == block.file) {
169
+ if (entry == group.file) {
170
170
  break;
171
171
  }
172
172
  i++;
@@ -182,9 +182,9 @@ export default class StyleComponent extends BaseComponent {
182
182
  ...this.project.chokidarOpts
183
183
  }).on('all', (event, path) => {
184
184
  let hasRanSingle = false;
185
- for (var block of this.files) {
186
- if (path == block.file || this.utils.getImportedSASSFiles(block.file).includes(path)) {
187
- this.process(block.file, { buildTheme: path == this.project.paths.theme.json });
185
+ for (let group of this.files) {
186
+ if (path == group.file || this.utils.getImportedSASSFiles(group.file).includes(path)) {
187
+ this.process(group.file, { buildTheme: path == this.project.paths.theme.json });
188
188
  hasRanSingle = true;
189
189
  }
190
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdc-build-wp",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "description": "Custom WordPress build process.",
5
5
  "engines": {
6
6
  "node": ">=22"