mod-build 3.6.60-beta.1 → 3.6.60-beta.2
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 +0 -4
- package/gulp-tasks/grab-shared-scripts.js +24 -4
- package/gulp-tasks/templates.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -21,26 +21,30 @@ var pathSubdirectory = '';
|
|
|
21
21
|
|
|
22
22
|
function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
23
23
|
const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.src}}{{this.src}}{{/if}}resources/scripts/mod-alytics/` : '/resources/scripts/mod-alytics/';
|
|
24
|
+
console.log(`modAlyticsFileName variable = ${fileNames.modAlyticsFileName}`)
|
|
24
25
|
return gulp.src(siteSettings.srcFolder + '/shared-components/head/head.html')
|
|
25
26
|
.pipe(replace(/".*(modalytics).*"/, `"${resourcePath}${fileNames.modAlyticsFileName}"`))
|
|
26
27
|
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/head'));
|
|
27
28
|
}
|
|
28
29
|
function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
29
|
-
console.log('>> STARTING
|
|
30
|
+
console.log('>> STARTING replacing foot asset scripts');
|
|
30
31
|
const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts` : '/resources/scripts';
|
|
31
32
|
return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
32
33
|
.pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"|"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"|"(?:(?!"|")[\s\S])+(mod-form\/form.*?)js"/g, function(match) {
|
|
33
34
|
if (match.includes('mod-form/form')) {
|
|
35
|
+
console.log(`homeownerFormFileName variable = ${fileNames.homeownerFormFileName}`);
|
|
34
36
|
return `"${resourcePath}/mod-form/form/${fileNames.homeownerFormFileName}"`;
|
|
35
37
|
} else if (match.includes('modutils') || match.includes('mod-utils')) {
|
|
38
|
+
console.log(`modUtilsFileName variable = ${fileNames.modUtilsFileName}`)
|
|
36
39
|
return `"${resourcePath}/mod-utils/${fileNames.modUtilsFileName}"`;
|
|
37
40
|
} else if (match.includes('footer-component')) {
|
|
41
|
+
console.log(`footerComponentJsFileName variable = ${fileNames.footerComponentJsFileName}`)
|
|
38
42
|
return `"${resourcePath}/footer/${fileNames.footerComponentJsFileName}"`;
|
|
39
43
|
}
|
|
40
44
|
}))
|
|
41
45
|
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'))
|
|
42
46
|
.on('end', function() {
|
|
43
|
-
console.log('>> FINISHED
|
|
47
|
+
console.log('>> FINISHED replacing foot asset scripts');
|
|
44
48
|
});
|
|
45
49
|
}
|
|
46
50
|
function replaceAbandonmentJsCssSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
@@ -52,6 +56,8 @@ function replaceAbandonmentJsCssSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
52
56
|
.pipe(gulp.dest(siteSettings.srcFolder + '/templates/abandonment'));
|
|
53
57
|
}
|
|
54
58
|
function replaceFooterStylesReference(gulp, gulpPlugins, siteSettings, siteData) {
|
|
59
|
+
console.log(`modFooterStylesFileName variable (main styles) = ${fileNames.modFooterStylesFileName}`)
|
|
60
|
+
console.log(`qsFooterStylesFileName variable (main styles) = ${fileNames.qsFooterStylesFileName}`)
|
|
55
61
|
if (siteData.siteData && siteData.siteData.useRelativePathForResources === true) {
|
|
56
62
|
return gulp.src(siteSettings.srcFolder + '/resources/scripts/footer/' + fileNames.footerComponentJsFileName)
|
|
57
63
|
.pipe(replace(/concat\((?:(?!concat\(|\))[\s\S])+(components\/footer\/mod.*?)\)/, `concat("${pathSubdirectory}resources/styles/components/footer/` + fileNames.modFooterStylesFileName + '")'))
|
|
@@ -65,6 +71,8 @@ function replaceFooterStylesReference(gulp, gulpPlugins, siteSettings, siteData)
|
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
function replaceFooterStylesReferenceInMap(gulp, gulpPlugins, siteSettings, siteData) {
|
|
74
|
+
console.log(`modFooterStylesFileName variable (map styles) = ${fileNames.modFooterStylesFileName}`)
|
|
75
|
+
console.log(`qsFooterStylesFileName variable (map styles) = ${fileNames.qsFooterStylesFileName}`)
|
|
68
76
|
if (siteData.siteData && siteData.siteData.useRelativePathForResources === true) {
|
|
69
77
|
return gulp.src(siteSettings.srcFolder + '/resources/scripts/footer/footer-component.min.js.map')
|
|
70
78
|
.pipe(replace(/\`(?:(?!\`|\`)[\s\S])+(components\/footer\/mod.*?)\`/, '`' + pathSubdirectory + 'resources/styles/components/footer/' + fileNames.modFooterStylesFileName + '`'))
|
|
@@ -106,6 +114,7 @@ function getResource(url, config = {}, fn, fnArray) {
|
|
|
106
114
|
.pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
|
|
107
115
|
.on('finish', function(){
|
|
108
116
|
console.log(fileNames[config.fileName]);
|
|
117
|
+
console.log(`full fileNames array = ${fileNames}`)
|
|
109
118
|
resolve();
|
|
110
119
|
});
|
|
111
120
|
})
|
|
@@ -125,7 +134,10 @@ function getResource(url, config = {}, fn, fnArray) {
|
|
|
125
134
|
})
|
|
126
135
|
.pipe(source(file))
|
|
127
136
|
.pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
|
|
128
|
-
.on('finish',
|
|
137
|
+
.on('finish', function(){
|
|
138
|
+
console.log('finished copying map file');
|
|
139
|
+
resolve();
|
|
140
|
+
});
|
|
129
141
|
});
|
|
130
142
|
})
|
|
131
143
|
.then(() => {
|
|
@@ -136,7 +148,15 @@ function getResource(url, config = {}, fn, fnArray) {
|
|
|
136
148
|
}
|
|
137
149
|
});
|
|
138
150
|
}
|
|
139
|
-
})
|
|
151
|
+
})
|
|
152
|
+
.then(() => {
|
|
153
|
+
console.log('FOOT ASSETS content:')
|
|
154
|
+
fetch(`${siteSettings.srcFolder} + '/shared-components/foot-assets/foot-assets.html`)
|
|
155
|
+
.then(response => response.text())
|
|
156
|
+
.then(html => {
|
|
157
|
+
console.log(html);
|
|
158
|
+
})
|
|
159
|
+
})
|
|
140
160
|
}
|
|
141
161
|
const TASKS = {
|
|
142
162
|
copyModutils: {
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -257,7 +257,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
257
257
|
'!' + siteSettings.srcFolder + '/' + siteSettings.templatesSubfolder + '/_partials/**/*.html'
|
|
258
258
|
])
|
|
259
259
|
.pipe(gulpPlugins.handlebarsFileInclude(templatesData, {
|
|
260
|
-
maxRecursion:
|
|
260
|
+
maxRecursion: 500,
|
|
261
261
|
handlebarsHelpers: handlebarsHelpers
|
|
262
262
|
}))
|
|
263
263
|
.pipe(gulp.dest(siteSettings.tmpFolder));
|