mod-build 3.6.36-beta.6 → 3.6.36-beta.8
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.
|
@@ -4,7 +4,6 @@ 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
|
-
var buffer = require('gulp-buffer');
|
|
8
7
|
|
|
9
8
|
const fileNames = {
|
|
10
9
|
modAlyticsFileName: '',
|
|
@@ -15,7 +14,7 @@ const fileNames = {
|
|
|
15
14
|
qsFooterStylesFileName: '',
|
|
16
15
|
modFormFileName: '',
|
|
17
16
|
qsFormFileName: '',
|
|
18
|
-
|
|
17
|
+
newModFormFileName: ''
|
|
19
18
|
};
|
|
20
19
|
var isQuotePageOrUseRelativePath = false;
|
|
21
20
|
var resourceURL = '';
|
|
@@ -29,10 +28,10 @@ function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
29
28
|
function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
30
29
|
const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts' : '/resources/scripts';
|
|
31
30
|
return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
32
|
-
.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.*?)js"/g, function(match) {
|
|
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) {
|
|
33
32
|
if (match.includes('mod-form')) {
|
|
34
33
|
if (match.includes('mod-form/form')) {
|
|
35
|
-
return `"${resourcePath}/mod-form/form/${fileNames.
|
|
34
|
+
return `"${resourcePath}/mod-form/form/${fileNames.newModFormFileName}"`;
|
|
36
35
|
} else if (match.includes('qs-form')) {
|
|
37
36
|
return `"${resourcePath}/mod-form/${fileNames.qsFormFileName}"`;
|
|
38
37
|
} else {
|
|
@@ -97,10 +96,8 @@ function getResource(url, config = {}, fn, fnArray) {
|
|
|
97
96
|
}
|
|
98
97
|
})
|
|
99
98
|
.pipe(source(`${file}`))
|
|
100
|
-
.pipe(buffer())
|
|
101
99
|
.pipe(hash({
|
|
102
100
|
hashLength: 20,
|
|
103
|
-
algorithm: 'md5',
|
|
104
101
|
template: file.replace(/^([^.]*)\.(.*)$/, '$1-<%= hash %>.$2')
|
|
105
102
|
}))
|
|
106
103
|
.pipe(tap(function(file, t) {
|
|
@@ -199,16 +196,6 @@ const TASKS = {
|
|
|
199
196
|
srcReplaceFn: null,
|
|
200
197
|
additionalSrcReplaceFns: []
|
|
201
198
|
},
|
|
202
|
-
copyHomeownerForm: {
|
|
203
|
-
url: `mod-form/form/homeowner.min.js`,
|
|
204
|
-
config: {
|
|
205
|
-
fileName: 'homeownerFormFileName',
|
|
206
|
-
dest: 'scripts/mod-form/form',
|
|
207
|
-
mapUrl: `mod-form/form/homeowner.min.js.map`,
|
|
208
|
-
},
|
|
209
|
-
srcReplaceFn: null,
|
|
210
|
-
additionalSrcReplaceFns: []
|
|
211
|
-
},
|
|
212
199
|
copyQsForm: {
|
|
213
200
|
url: `mod-form/qs-form.min.js`,
|
|
214
201
|
config: {
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mod-build",
|
|
3
|
-
"version": "3.6.36-beta.
|
|
3
|
+
"version": "3.6.36-beta.8",
|
|
4
4
|
"description": "Share components for S3 sites.",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
-
"serve": "node --max-old-space-size=4096 gulp grab-shared-scripts"
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
7
|
},
|
|
9
8
|
"author": "",
|
|
10
9
|
"license": "ISC",
|
|
@@ -15,11 +14,9 @@
|
|
|
15
14
|
"bootstrap-sass": "^3.4.3",
|
|
16
15
|
"browser-sync": "^2.18.6",
|
|
17
16
|
"del": "^3.0.0",
|
|
18
|
-
"fancy-log": "^2.0.0",
|
|
19
17
|
"gulp": "^3.9.1",
|
|
20
18
|
"gulp-autoprefixer": "^3.1.1",
|
|
21
19
|
"gulp-babel": "^8.0.0",
|
|
22
|
-
"gulp-buffer": "0.0.2",
|
|
23
20
|
"gulp-clean-css": "^3.0.4",
|
|
24
21
|
"gulp-concat": "^2.6.1",
|
|
25
22
|
"gulp-cssmin": "^0.1.7",
|
|
@@ -34,7 +31,6 @@
|
|
|
34
31
|
"gulp-imagemin": "^3.2.0",
|
|
35
32
|
"gulp-insert": "^0.5.0",
|
|
36
33
|
"gulp-load-plugins": "^0.10.0",
|
|
37
|
-
"gulp-md5": "^0.1.3",
|
|
38
34
|
"gulp-minify": "0.0.14",
|
|
39
35
|
"gulp-mocha-phantomjs": "^0.12.1",
|
|
40
36
|
"gulp-plumber": "^1.1.0",
|
|
@@ -60,7 +56,6 @@
|
|
|
60
56
|
"lodash.merge": "^4.6.2",
|
|
61
57
|
"nouislider": "^10.1.0",
|
|
62
58
|
"path": "^0.12.7",
|
|
63
|
-
"plugin-error": "^2.0.1",
|
|
64
59
|
"request": "^2.88.0",
|
|
65
60
|
"run-sequence": "^2.2.1",
|
|
66
61
|
"sass": "^1.49.9",
|