mod-build 3.6.34 → 3.6.35
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 +22 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.6.35
|
|
4
|
+
|
|
5
|
+
- trying one replace pipe for `replaceFootAssetScripts` function inside our `grab-shared-scripts` task. also added some console logs so within build.sh in circleci — you will be able to see it complete all the replacements.
|
|
6
|
+
|
|
3
7
|
## 3.6.34
|
|
4
8
|
|
|
5
9
|
- undid the chaining in `replaceFootAssetScripts` function inside our `grab-shared-scripts` task. seemed to make things worse in terms of replacing paths.
|
|
@@ -13,7 +13,8 @@ const fileNames = {
|
|
|
13
13
|
modFooterStylesFileName: '',
|
|
14
14
|
qsFooterStylesFileName: '',
|
|
15
15
|
modFormFileName: '',
|
|
16
|
-
qsFormFileName: ''
|
|
16
|
+
qsFormFileName: '',
|
|
17
|
+
newModFormFileName: ''
|
|
17
18
|
};
|
|
18
19
|
var isQuotePageOrUseRelativePath = false;
|
|
19
20
|
var resourceURL = '';
|
|
@@ -27,11 +28,26 @@ function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
27
28
|
function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
28
29
|
const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts' : '/resources/scripts';
|
|
29
30
|
return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
.pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"|"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"|"(?:(?!"|")[\s\S])+(mod-form\/mod-form.*?)js"|"(?:(?!"|")[\s\S])+(qs-form.*?)js"|"(?:(?!"|")[\s\S])+(mod-form\/form\/mod-form.*?)js"/g, function(match) {
|
|
32
|
+
if (match.includes('mod-form')) {
|
|
33
|
+
if (match.includes('mod-form/form')) {
|
|
34
|
+
console.log('replaced modular mod-form');
|
|
35
|
+
return `"${resourcePath}/mod-form/form/${fileNames.newModFormFileName}"`;
|
|
36
|
+
} else if (match.includes('qs-form')) {
|
|
37
|
+
console.log('replaced qs-form');
|
|
38
|
+
return `"${resourcePath}/mod-form/${fileNames.qsFormFileName}"`;
|
|
39
|
+
} else {
|
|
40
|
+
console.log('replaced mod-form');
|
|
41
|
+
return `"${resourcePath}/mod-form/${fileNames.modFormFileName}"`;
|
|
42
|
+
}
|
|
43
|
+
} else if (match.includes('modutils') || match.includes('mod-utils')) {
|
|
44
|
+
console.log('replaced modutils');
|
|
45
|
+
return `"${resourcePath}/mod-utils/${fileNames.modUtilsFileName}"`;
|
|
46
|
+
} else if (match.includes('footer-component')) {
|
|
47
|
+
console.log('replaced footer component');
|
|
48
|
+
return `"${resourcePath}/footer/${fileNames.footerComponentJsFileName}"`;
|
|
49
|
+
}
|
|
50
|
+
}))
|
|
35
51
|
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
|
|
36
52
|
}
|
|
37
53
|
function replaceAbandonmentJsCssSrc(gulp, gulpPlugins, siteSettings, siteData) {
|