mod-build 3.6.36 → 3.6.38
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 +7 -20
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.6.38
|
|
4
|
+
|
|
5
|
+
- when we removed the mod-form-beta functionality in 3.6.37 — we needed to also remove the replace search in the function.
|
|
6
|
+
|
|
7
|
+
## 3.6.37
|
|
8
|
+
|
|
9
|
+
- removing the mod-form-beta functionality in `grab-shared-scripts` while we rename the files.
|
|
10
|
+
|
|
3
11
|
## 3.6.36
|
|
4
12
|
|
|
5
13
|
- implementing fix needed for grabbing SVG sprites in our `grab-global-images` task. also removed consoles running in `grab-shared-scripts`
|
|
@@ -28,7 +28,7 @@ function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
28
28
|
function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
29
29
|
const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts' : '/resources/scripts';
|
|
30
30
|
return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
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"
|
|
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"/g, function(match) {
|
|
32
32
|
if (match.includes('mod-form')) {
|
|
33
33
|
if (match.includes('mod-form/form')) {
|
|
34
34
|
return `"${resourcePath}/mod-form/form/${fileNames.newModFormFileName}"`;
|
|
@@ -89,21 +89,18 @@ function getResource(url, config = {}, fn, fnArray) {
|
|
|
89
89
|
|
|
90
90
|
return new Promise(resolve => {
|
|
91
91
|
const file = getFileFromURL(url);
|
|
92
|
-
|
|
93
|
-
let stream = request(`${resourceURL}/${url}`)
|
|
92
|
+
request(`${resourceURL}/${url}`)
|
|
94
93
|
.on('response', resp => {
|
|
95
94
|
if (resp.statusCode !== 200) {
|
|
96
95
|
throw new Error(`${resp.statusCode} Error while fetching ${file}`);
|
|
97
96
|
}
|
|
98
97
|
})
|
|
99
98
|
.pipe(source(`${file}`))
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
stream.pipe(tap(function(file, t) {
|
|
99
|
+
.pipe(hash({
|
|
100
|
+
hashLength: 20,
|
|
101
|
+
template: file.replace(/^([^.]*)\.(.*)$/, '$1-<%= hash %>.$2')
|
|
102
|
+
}))
|
|
103
|
+
.pipe(tap(function(file, t) {
|
|
107
104
|
fileNames[config.fileName] = path.basename(file.path);
|
|
108
105
|
}))
|
|
109
106
|
.pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
|
|
@@ -199,16 +196,6 @@ const TASKS = {
|
|
|
199
196
|
srcReplaceFn: null,
|
|
200
197
|
additionalSrcReplaceFns: []
|
|
201
198
|
},
|
|
202
|
-
copyNewModForm: {
|
|
203
|
-
url: `mod-form/form/mod-form-beta.min.js`,
|
|
204
|
-
mapUrl: `mod-form/form/mod-form-beta.min.js.map`,
|
|
205
|
-
config: {
|
|
206
|
-
fileName: 'newModFormFileName',
|
|
207
|
-
dest: 'scripts/mod-form/form'
|
|
208
|
-
},
|
|
209
|
-
srcReplaceFn: null,
|
|
210
|
-
additionalSrcReplaceFns: []
|
|
211
|
-
},
|
|
212
199
|
copyQsForm: {
|
|
213
200
|
url: `mod-form/qs-form.min.js`,
|
|
214
201
|
config: {
|