mod-build 3.6.32 → 3.6.34-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 +8 -0
- package/gulp-tasks/grab-shared-scripts.js +25 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.6.34
|
|
4
|
+
|
|
5
|
+
- undid the chaining in `replaceFootAssetScripts` function inside our `grab-shared-scripts` task. seemed to make things worse in terms of replacing paths.
|
|
6
|
+
|
|
7
|
+
## 3.6.33
|
|
8
|
+
|
|
9
|
+
- chained the `.pipe(replace())` lines within the `replaceFootAssetScripts` function inside our `grab-shared-scripts` task to run after the previous has been completed — in hopes to keep our foot assets paths from getting incomplete paths during deployment
|
|
10
|
+
|
|
3
11
|
## 3.6.32
|
|
4
12
|
|
|
5
13
|
- made changes in `grab-cdn` task to copy footer templates
|
|
@@ -4,6 +4,7 @@ var replace = require('gulp-replace');
|
|
|
4
4
|
var hash = require('gulp-hash');
|
|
5
5
|
var tap = require('gulp-tap');
|
|
6
6
|
var path = require('path');
|
|
7
|
+
|
|
7
8
|
const fileNames = {
|
|
8
9
|
modAlyticsFileName: '',
|
|
9
10
|
modUtilsFileName: '',
|
|
@@ -12,24 +13,41 @@ const fileNames = {
|
|
|
12
13
|
modFooterStylesFileName: '',
|
|
13
14
|
qsFooterStylesFileName: '',
|
|
14
15
|
modFormFileName: '',
|
|
15
|
-
qsFormFileName: ''
|
|
16
|
+
qsFormFileName: '',
|
|
17
|
+
newModFormFileName: ''
|
|
16
18
|
};
|
|
17
19
|
var isQuotePageOrUseRelativePath = false;
|
|
18
20
|
var resourceURL = '';
|
|
21
|
+
|
|
19
22
|
function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
20
23
|
const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.src}}{{this.src}}{{/if}}resources/scripts/mod-alytics/' : '/resources/scripts/mod-alytics/';
|
|
21
24
|
return gulp.src(siteSettings.srcFolder + '/shared-components/head/head.html')
|
|
22
|
-
.pipe(replace(/".*(modalytics).*"/, resourcePath
|
|
25
|
+
.pipe(replace(/".*(modalytics).*"/, `"${resourcePath}${fileNames.modAlyticsFileName}"`))
|
|
23
26
|
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/head'));
|
|
24
27
|
}
|
|
25
28
|
function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
26
29
|
const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts' : '/resources/scripts';
|
|
27
30
|
return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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('qs-form')) {
|
|
34
|
+
console.log('replaced qs-form');
|
|
35
|
+
return `"${resourcePath}/mod-form/${fileNames.qsFormFileName}"`;
|
|
36
|
+
} else if (match.includes('mod-form/form')) {
|
|
37
|
+
console.log('replaced modular mod-form');
|
|
38
|
+
return `"${resourcePath}/mod-form/form/${fileNames.newModFormFileName}"`;
|
|
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
|
+
}))
|
|
33
51
|
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
|
|
34
52
|
}
|
|
35
53
|
function replaceAbandonmentJsCssSrc(gulp, gulpPlugins, siteSettings, siteData) {
|