mod-build 4.0.0-beta.4f → 4.0.0-beta.4g

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.0-beta.4f",
3
+ "version": "4.0.0-beta.4g",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -10,17 +10,7 @@ import hash from 'gulp-hash';
10
10
  import replace from 'gulp-replace';
11
11
  import { getFileFromURL } from '../src/scripts/utils.js';
12
12
 
13
- let fileNames = {
14
- modAlyticsFileName: '',
15
- modUtilsFileName: '',
16
- abandonmentJsFileName: '',
17
- footerComponentJsFileName: '',
18
- modFooterStylesFileName: '',
19
- qsFooterStylesFileName: '',
20
- homeownerFormFileName: ''
21
- };
22
-
23
- let pathSubdirectory = '';
13
+ let fileNames = {};
24
14
  let componentFolderPath = '';
25
15
 
26
16
  function replaceModalyticsSrc(gulp, defaultSettings) {
@@ -193,7 +183,6 @@ function getResource(task, fileNames, resourcePath = 'quote/resources') {
193
183
  return true
194
184
  })
195
185
  .then(() => {
196
- console.log(`>> FILENAMES object = ${JSON.stringify(fileNames)}`);
197
186
  resolve();
198
187
  })
199
188
  .catch((error) => {
@@ -204,13 +193,10 @@ function getResource(task, fileNames, resourcePath = 'quote/resources') {
204
193
  }
205
194
 
206
195
  export default async function(config) {
207
- const { isLocal } = defaultSettings;
208
196
  const useAccessibleComponents = config.useAccessibleConfig;
209
197
  componentFolderPath = useAccessibleComponents === true ? 'accessible-components' : 'shared-components';
210
- const isPathSubdirectory = config.siteData?.pathSubdirectory || config.pathSubdirectory;
211
- pathSubdirectory = !isLocal && isPathSubdirectory ? isPathSubdirectory : '';
212
-
213
198
  const tasks = Object.values(TASKS);
199
+
214
200
  if (tasks.length) {
215
201
  const getAllResources = tasks.map(async function(task) {
216
202
  if (useAccessibleComponents && task.url.includes('abandonment.min.js')) {
@@ -220,6 +206,9 @@ export default async function(config) {
220
206
  await getResource(task, fileNames);
221
207
  });
222
208
 
223
- await Promise.all(getAllResources);
209
+ await Promise.all(getAllResources)
210
+ .then(() => {
211
+ console.log(`>> FILENAMES object = ${JSON.stringify(fileNames)}`);
212
+ })
224
213
  }
225
214
  }