mod-build 3.6.32-beta.6 → 3.6.32-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,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
|
+
var async = require('async');
|
|
7
8
|
const fileNames = {
|
|
8
9
|
modAlyticsFileName: '',
|
|
9
10
|
modUtilsFileName: '',
|
|
@@ -19,18 +20,34 @@ var resourceURL = '';
|
|
|
19
20
|
function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
20
21
|
const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.src}}{{this.src}}{{/if}}resources/scripts/mod-alytics/' : '/resources/scripts/mod-alytics/';
|
|
21
22
|
return gulp.src(siteSettings.srcFolder + '/shared-components/head/head.html')
|
|
22
|
-
.pipe(replace(/".*(modalytics).*"/, resourcePath
|
|
23
|
+
.pipe(replace(/".*(modalytics).*"/, `"${resourcePath}${fileNames.modAlyticsFileName}"`))
|
|
23
24
|
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/head'));
|
|
24
25
|
}
|
|
25
26
|
function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
|
|
26
27
|
const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts' : '/resources/scripts';
|
|
27
28
|
return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
28
|
-
.pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"/, resourcePath
|
|
29
|
-
.pipe(
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
.pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"/, `"${resourcePath}/mod-utils/${fileNames.modUtilsFileName}"`))
|
|
30
|
+
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'))
|
|
31
|
+
.on('end', function(){
|
|
32
|
+
gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
33
|
+
.pipe(replace(/"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"/, `"${resourcePath}/footer/${fileNames.footerComponentJsFileName}"`))
|
|
34
|
+
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'))
|
|
35
|
+
.on('end', function(){
|
|
36
|
+
gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
37
|
+
.pipe(replace(/"(?:(?!"|")[\s\S])+(mod-form\/mod-form.*?)js"/, `"${resourcePath}/mod-form/${fileNames.modFormFileName}"`))
|
|
38
|
+
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'))
|
|
39
|
+
.on('end', function(){
|
|
40
|
+
gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
41
|
+
.pipe(replace(/"(?:(?!"|")[\s\S])+(mod-form\/form\/mod-form.*?)js"/, `"${resourcePath}/mod-form/form/${fileNames.newModFormFileName}"`))
|
|
42
|
+
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'))
|
|
43
|
+
.on('end', function(){
|
|
44
|
+
gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
|
|
45
|
+
.pipe(replace(/"(?:(?!"|")[\s\S])+(qs-form.*?)js"/, `"${resourcePath}/mod-form/${fileNames.qsFormFileName}"`))
|
|
46
|
+
.pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'))
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
})
|
|
34
51
|
}
|
|
35
52
|
function replaceAbandonmentJsCssSrc(gulp, gulpPlugins, siteSettings, siteData) {
|
|
36
53
|
const jsResourcePath = isQuotePageOrUseRelativePath ? 'resources/scripts/abandonment/' : '/resources/scripts/abandonment/';
|
|
@@ -186,11 +203,11 @@ const TASKS = {
|
|
|
186
203
|
srcReplaceFn: null,
|
|
187
204
|
additionalSrcReplaceFns: []
|
|
188
205
|
},
|
|
189
|
-
|
|
190
|
-
url: `mod-form/form/mod-form.min.js`,
|
|
191
|
-
mapUrl: `mod-form/form/mod-form.min.js.map`,
|
|
206
|
+
copyNewModForm: {
|
|
207
|
+
url: `mod-form/form/mod-form-beta.min.js`,
|
|
208
|
+
mapUrl: `mod-form/form/mod-form-beta.min.js.map`,
|
|
192
209
|
config: {
|
|
193
|
-
fileName: '
|
|
210
|
+
fileName: 'newModFormFileName',
|
|
194
211
|
dest: 'scripts/mod-form/form'
|
|
195
212
|
},
|
|
196
213
|
srcReplaceFn: null,
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mod-build",
|
|
3
|
-
"version": "3.6.32-beta.
|
|
3
|
+
"version": "3.6.32-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,7 +14,6 @@
|
|
|
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",
|
|
@@ -33,7 +31,6 @@
|
|
|
33
31
|
"gulp-imagemin": "^3.2.0",
|
|
34
32
|
"gulp-insert": "^0.5.0",
|
|
35
33
|
"gulp-load-plugins": "^0.10.0",
|
|
36
|
-
"gulp-md5": "^0.1.3",
|
|
37
34
|
"gulp-minify": "0.0.14",
|
|
38
35
|
"gulp-mocha-phantomjs": "^0.12.1",
|
|
39
36
|
"gulp-plumber": "^1.1.0",
|
|
@@ -59,12 +56,10 @@
|
|
|
59
56
|
"lodash.merge": "^4.6.2",
|
|
60
57
|
"nouislider": "^10.1.0",
|
|
61
58
|
"path": "^0.12.7",
|
|
62
|
-
"plugin-error": "^2.0.1",
|
|
63
59
|
"request": "^2.88.0",
|
|
64
60
|
"run-sequence": "^2.2.1",
|
|
65
61
|
"sass": "^1.49.9",
|
|
66
62
|
"should": "^11.2.1",
|
|
67
|
-
"through2": "^4.0.2",
|
|
68
63
|
"vinyl-source-stream": "^2.0.0",
|
|
69
64
|
"webpack-stream": "^5.2.1"
|
|
70
65
|
},
|