mod-build 3.6.35 → 3.6.36-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
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.6.36
|
|
4
|
+
|
|
5
|
+
- implementing fix needed for grabbing SVG sprites in our `grab-global-images` task. also removed consoles running in `grab-shared-scripts`
|
|
6
|
+
|
|
3
7
|
## 3.6.35
|
|
4
8
|
|
|
5
9
|
- 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.
|
|
@@ -16,7 +16,7 @@ function getFilePathFromURL(url) {
|
|
|
16
16
|
|
|
17
17
|
function streamToDestination(gulp, siteSettings, url) {
|
|
18
18
|
let finalDestination;
|
|
19
|
-
|
|
19
|
+
let fileName = path.basename(url);
|
|
20
20
|
const filePath = getFilePathFromURL(url);
|
|
21
21
|
|
|
22
22
|
if (!fs.existsSync(siteSettings.distFolder)) {
|
|
@@ -25,6 +25,13 @@ function streamToDestination(gulp, siteSettings, url) {
|
|
|
25
25
|
finalDestination = siteSettings.distFolder;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// fix for svg sprites
|
|
29
|
+
if (fileName.includes(".svg#")) {
|
|
30
|
+
const hashIndex = fileName.indexOf("#");
|
|
31
|
+
const strippedFileName = fileName.substring(0, hashIndex);
|
|
32
|
+
fileName = strippedFileName;
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
return new Promise(resolve => { // eslint-disable-line no-undef
|
|
29
36
|
request(url)
|
|
30
37
|
.on('response', resp => {
|
|
@@ -14,7 +14,7 @@ const fileNames = {
|
|
|
14
14
|
qsFooterStylesFileName: '',
|
|
15
15
|
modFormFileName: '',
|
|
16
16
|
qsFormFileName: '',
|
|
17
|
-
|
|
17
|
+
homeownerFormFileName: ''
|
|
18
18
|
};
|
|
19
19
|
var isQuotePageOrUseRelativePath = false;
|
|
20
20
|
var resourceURL = '';
|
|
@@ -31,20 +31,15 @@ function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
31
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
32
|
if (match.includes('mod-form')) {
|
|
33
33
|
if (match.includes('mod-form/form')) {
|
|
34
|
-
|
|
35
|
-
return `"${resourcePath}/mod-form/form/${fileNames.newModFormFileName}"`;
|
|
34
|
+
return `"${resourcePath}/mod-form/form/${fileNames.homeownerFormFileName}"`;
|
|
36
35
|
} else if (match.includes('qs-form')) {
|
|
37
|
-
console.log('replaced qs-form');
|
|
38
36
|
return `"${resourcePath}/mod-form/${fileNames.qsFormFileName}"`;
|
|
39
37
|
} else {
|
|
40
|
-
console.log('replaced mod-form');
|
|
41
38
|
return `"${resourcePath}/mod-form/${fileNames.modFormFileName}"`;
|
|
42
39
|
}
|
|
43
40
|
} else if (match.includes('modutils') || match.includes('mod-utils')) {
|
|
44
|
-
console.log('replaced modutils');
|
|
45
41
|
return `"${resourcePath}/mod-utils/${fileNames.modUtilsFileName}"`;
|
|
46
42
|
} else if (match.includes('footer-component')) {
|
|
47
|
-
console.log('replaced footer component');
|
|
48
43
|
return `"${resourcePath}/footer/${fileNames.footerComponentJsFileName}"`;
|
|
49
44
|
}
|
|
50
45
|
}))
|
|
@@ -204,12 +199,12 @@ const TASKS = {
|
|
|
204
199
|
srcReplaceFn: null,
|
|
205
200
|
additionalSrcReplaceFns: []
|
|
206
201
|
},
|
|
207
|
-
|
|
208
|
-
url: `mod-form/form/
|
|
209
|
-
mapUrl: `mod-form/form/mod-form-beta.min.js.map`,
|
|
202
|
+
copyHomeownerForm: {
|
|
203
|
+
url: `mod-form/form/homeowner.min.js`,
|
|
210
204
|
config: {
|
|
211
|
-
fileName: '
|
|
212
|
-
dest: 'scripts/mod-form/form'
|
|
205
|
+
fileName: 'homeownerFormFileName',
|
|
206
|
+
dest: 'scripts/mod-form/form',
|
|
207
|
+
mapUrl: `mod-form/form/homeowner.min.js.map`,
|
|
213
208
|
},
|
|
214
209
|
srcReplaceFn: null,
|
|
215
210
|
additionalSrcReplaceFns: []
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mod-build",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.36-beta.1",
|
|
4
4
|
"description": "Share components for S3 sites.",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"serve": "node --max-old-space-size=4096 gulp grab-shared-scripts"
|
|
7
8
|
},
|
|
8
9
|
"author": "",
|
|
9
10
|
"license": "ISC",
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
"bootstrap-sass": "^3.4.3",
|
|
15
16
|
"browser-sync": "^2.18.6",
|
|
16
17
|
"del": "^3.0.0",
|
|
18
|
+
"fancy-log": "^2.0.0",
|
|
17
19
|
"gulp": "^3.9.1",
|
|
18
20
|
"gulp-autoprefixer": "^3.1.1",
|
|
19
21
|
"gulp-babel": "^8.0.0",
|
|
@@ -31,6 +33,7 @@
|
|
|
31
33
|
"gulp-imagemin": "^3.2.0",
|
|
32
34
|
"gulp-insert": "^0.5.0",
|
|
33
35
|
"gulp-load-plugins": "^0.10.0",
|
|
36
|
+
"gulp-md5": "^0.1.3",
|
|
34
37
|
"gulp-minify": "0.0.14",
|
|
35
38
|
"gulp-mocha-phantomjs": "^0.12.1",
|
|
36
39
|
"gulp-plumber": "^1.1.0",
|
|
@@ -56,10 +59,12 @@
|
|
|
56
59
|
"lodash.merge": "^4.6.2",
|
|
57
60
|
"nouislider": "^10.1.0",
|
|
58
61
|
"path": "^0.12.7",
|
|
62
|
+
"plugin-error": "^2.0.1",
|
|
59
63
|
"request": "^2.88.0",
|
|
60
64
|
"run-sequence": "^2.2.1",
|
|
61
65
|
"sass": "^1.49.9",
|
|
62
66
|
"should": "^11.2.1",
|
|
67
|
+
"through2": "^4.0.2",
|
|
63
68
|
"vinyl-source-stream": "^2.0.0",
|
|
64
69
|
"webpack-stream": "^5.2.1"
|
|
65
70
|
},
|