mod-build 3.6.63 → 3.6.64
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 +4 -0
- package/gulp-tasks/grab-shared-scripts.js +1 -16
- package/package.json +1 -1
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 loaded, & 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 + '`'))
|
|
@@ -114,7 +105,6 @@ function getResource(url, config = {}, fn, fnArray) {
|
|
|
114
105
|
}))
|
|
115
106
|
.pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
|
|
116
107
|
.on('finish', function(){
|
|
117
|
-
console.log(fileNames[config.fileName]);
|
|
118
108
|
resolve();
|
|
119
109
|
});
|
|
120
110
|
})
|
|
@@ -135,7 +125,6 @@ function getResource(url, config = {}, fn, fnArray) {
|
|
|
135
125
|
.pipe(source(file))
|
|
136
126
|
.pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
|
|
137
127
|
.on('finish', function(){
|
|
138
|
-
console.log(`>> SUCCESSFULLY copied map file = ${file}`);
|
|
139
128
|
resolve();
|
|
140
129
|
});
|
|
141
130
|
});
|
|
@@ -219,7 +208,7 @@ const TASKS = {
|
|
|
219
208
|
mapUrl: null,
|
|
220
209
|
},
|
|
221
210
|
srcReplaceFn: null,
|
|
222
|
-
additionalSrcReplaceFns: [
|
|
211
|
+
additionalSrcReplaceFns: []
|
|
223
212
|
},
|
|
224
213
|
copyQsFooterComponentStyles: {
|
|
225
214
|
url: 'shared-resources/styles/components/footer/qs-footer.min.css',
|
|
@@ -267,10 +256,6 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
267
256
|
return Promise.all(getAllResources)
|
|
268
257
|
.then(() => {
|
|
269
258
|
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
259
|
})
|
|
275
260
|
}());
|
|
276
261
|
};
|