mod-build 3.6.63 → 3.6.64-beta.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.64
4
+
5
+ - Removing the massive amounts of console logs added in version `3.6.60`; I think the issue with our `grab-shared-scripts` task was that we are calling the `[replaceFooterStylesReference, replaceFooterStylesReferenceInMap]` twice. On the first go around, the QS footer styles are not yet laoded, & then once QS footer styles DID get loaded and we called the function a second time – it might have gotten hung up (we should only call these functions once).
6
+
3
7
  ## 3.6.63
4
8
 
5
9
  - Adding conditional to check for `siteData` to exist before checking for the `useAccessibleConfig`.
@@ -22,24 +22,19 @@ var componentFolderPath = '';
22
22
 
23
23
  function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
24
24
  const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.src}}{{this.src}}{{/if}}resources/scripts/mod-alytics/` : '/resources/scripts/mod-alytics/';
25
- console.log(`>> VARIABLE modAlyticsFileName = ${fileNames.modAlyticsFileName}`)
26
25
  return gulp.src(`${siteSettings.srcFolder}/${componentFolderPath}/head/head.html`)
27
26
  .pipe(replace(/".*(modalytics).*"/, `"${resourcePath}${fileNames.modAlyticsFileName}"`))
28
27
  .pipe(gulp.dest(`${siteSettings.srcFolder}/${componentFolderPath}/head`));
29
28
  }
30
29
  function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
31
- console.log('>> STARTING replacing foot asset scripts');
32
30
  const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts` : '/resources/scripts';
33
31
  return gulp.src(`${siteSettings.srcFolder}/${componentFolderPath}/foot-assets/foot-assets.html`)
34
32
  .pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"|"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"|"(?:(?!"|")[\s\S])+(mod-form\/form.*?)js"/g, function(match) {
35
33
  if (match.includes('mod-form/form')) {
36
- console.log(`>> VARIABLE homeownerFormFileName = ${fileNames.homeownerFormFileName}`);
37
34
  return `"${resourcePath}/mod-form/form/${fileNames.homeownerFormFileName}"`;
38
35
  } else if (match.includes('modutils') || match.includes('mod-utils')) {
39
- console.log(`>> VARIABLE modUtilsFileName = ${fileNames.modUtilsFileName}`)
40
36
  return `"${resourcePath}/mod-utils/${fileNames.modUtilsFileName}"`;
41
37
  } else if (match.includes('footer-component')) {
42
- console.log(`>> VARIABLE footerComponentJsFileName = ${fileNames.footerComponentJsFileName}`)
43
38
  return `"${resourcePath}/footer/${fileNames.footerComponentJsFileName}"`;
44
39
  }
45
40
  }))
@@ -57,8 +52,6 @@ function replaceAbandonmentJsCssSrc(gulp, gulpPlugins, siteSettings, siteData) {
57
52
  .pipe(gulp.dest(siteSettings.srcFolder + '/templates/abandonment'));
58
53
  }
59
54
  function replaceFooterStylesReference(gulp, gulpPlugins, siteSettings, siteData) {
60
- console.log(`>> VARIABLE modFooterStylesFileName (main styles) = ${fileNames.modFooterStylesFileName}`)
61
- console.log(`>> VARIABLE qsFooterStylesFileName (main styles) = ${fileNames.qsFooterStylesFileName}`)
62
55
  if (siteData.siteData && siteData.siteData.useRelativePathForResources === true) {
63
56
  return gulp.src(siteSettings.srcFolder + '/resources/scripts/footer/' + fileNames.footerComponentJsFileName)
64
57
  .pipe(replace(/concat\((?:(?!concat\(|\))[\s\S])+(components\/footer\/mod.*?)\)/, `concat("${pathSubdirectory}resources/styles/components/footer/` + fileNames.modFooterStylesFileName + '")'))
@@ -72,8 +65,6 @@ function replaceFooterStylesReference(gulp, gulpPlugins, siteSettings, siteData)
72
65
  }
73
66
  }
74
67
  function replaceFooterStylesReferenceInMap(gulp, gulpPlugins, siteSettings, siteData) {
75
- console.log(`>> VARIABLE modFooterStylesFileName (map styles) = ${fileNames.modFooterStylesFileName}`)
76
- console.log(`>> VARIABLE qsFooterStylesFileName (map styles) = ${fileNames.qsFooterStylesFileName}`)
77
68
  if (siteData.siteData && siteData.siteData.useRelativePathForResources === true) {
78
69
  return gulp.src(siteSettings.srcFolder + '/resources/scripts/footer/footer-component.min.js.map')
79
70
  .pipe(replace(/\`(?:(?!\`|\`)[\s\S])+(components\/footer\/mod.*?)\`/, '`' + pathSubdirectory + 'resources/styles/components/footer/' + fileNames.modFooterStylesFileName + '`'))
@@ -135,7 +126,6 @@ function getResource(url, config = {}, fn, fnArray) {
135
126
  .pipe(source(file))
136
127
  .pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
137
128
  .on('finish', function(){
138
- console.log(`>> SUCCESSFULLY copied map file = ${file}`);
139
129
  resolve();
140
130
  });
141
131
  });
@@ -219,7 +209,7 @@ const TASKS = {
219
209
  mapUrl: null,
220
210
  },
221
211
  srcReplaceFn: null,
222
- additionalSrcReplaceFns: [replaceFooterStylesReference, replaceFooterStylesReferenceInMap]
212
+ additionalSrcReplaceFns: []
223
213
  },
224
214
  copyQsFooterComponentStyles: {
225
215
  url: 'shared-resources/styles/components/footer/qs-footer.min.css',
@@ -267,10 +257,6 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
267
257
  return Promise.all(getAllResources)
268
258
  .then(() => {
269
259
  console.log(`>> FILENAMES object = ${JSON.stringify(fileNames)}`);
270
- return gulp.src(`${siteSettings.srcFolder}/${componentFolderPath}/foot-assets/foot-assets.html`)
271
- .on('data', function (file) {
272
- console.log(`>> FOOT ASSETS HTML = ${file.contents.toString()}`);
273
- });
274
260
  })
275
261
  }());
276
262
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.63",
3
+ "version": "3.6.64-beta.1",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",