mod-build 3.6.32-beta.5 → 3.6.32-beta.7

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: '',
@@ -24,13 +25,38 @@ function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
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
- return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
28
- .pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"/, resourcePath + '/mod-utils/' + fileNames.modUtilsFileName))
29
- .pipe(replace(/"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"/, resourcePath + '/footer/' + fileNames.footerComponentJsFileName))
30
- .pipe(replace(/"(?:(?!"|")[\s\S])+(mod-form\/mod-form.*?)js"/, resourcePath + '/mod-form/' + fileNames.modFormFileName))
31
- .pipe(replace(/"(?:(?!"|")[\s\S])+(mod-form\/form\/mod-form.*?)js"/, resourcePath + '/mod-form/form/' + fileNames.modularModFormFileName))
32
- .pipe(replace(/"(?:(?!"|")[\s\S])+(qs-form.*?)js"/, resourcePath + '/mod-form/' + fileNames.qsFormFileName))
33
- .pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
28
+ return async.series([
29
+ function(callback){
30
+ gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
31
+ .pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"/, resourcePath + '/mod-utils/' + fileNames.modUtilsFileName))
32
+ .on('end', callback)
33
+ .pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
34
+ },
35
+ function(callback){
36
+ gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
37
+ .pipe(replace(/"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"/, resourcePath + '/footer/' + fileNames.footerComponentJsFileName))
38
+ .on('end', callback)
39
+ .pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
40
+ },
41
+ function(callback){
42
+ gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
43
+ .pipe(replace(/"(?:(?!"|")[\s\S])+(mod-form\/mod-form.*?)js"/, resourcePath + '/mod-form/' + fileNames.modFormFileName))
44
+ .on('end', callback)
45
+ .pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
46
+ },
47
+ function(callback){
48
+ gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
49
+ .pipe(replace(/"(?:(?!"|")[\s\S])+(mod-form\/form\/mod-form.*?)js"/, resourcePath + '/mod-form/form/' + fileNames.newModFormFileName))
50
+ .on('end', callback)
51
+ .pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
52
+ },
53
+ function(callback){
54
+ gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
55
+ .pipe(replace(/"(?:(?!"|")[\s\S])+(qs-form.*?)js"/, resourcePath + '/mod-form/' + fileNames.qsFormFileName))
56
+ .on('end', callback)
57
+ .pipe(gulp.dest(siteSettings.srcFolder + '/shared-components/foot-assets'));
58
+ }
59
+ ])
34
60
  }
35
61
  function replaceAbandonmentJsCssSrc(gulp, gulpPlugins, siteSettings, siteData) {
36
62
  const jsResourcePath = isQuotePageOrUseRelativePath ? 'resources/scripts/abandonment/' : '/resources/scripts/abandonment/';
@@ -186,11 +212,11 @@ const TASKS = {
186
212
  srcReplaceFn: null,
187
213
  additionalSrcReplaceFns: []
188
214
  },
189
- copyModularModForm: {
190
- url: `mod-form/form/mod-form.min.js`,
191
- mapUrl: `mod-form/form/mod-form.min.js.map`,
215
+ copyNewModForm: {
216
+ url: `mod-form/form/mod-form-beta.min.js`,
217
+ mapUrl: `mod-form/form/mod-form-beta.min.js.map`,
192
218
  config: {
193
- fileName: 'modularModFormFileName',
219
+ fileName: 'newModFormFileName',
194
220
  dest: 'scripts/mod-form/form'
195
221
  },
196
222
  srcReplaceFn: null,
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.32-beta.5",
3
+ "version": "3.6.32-beta.7",
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",
@@ -32,7 +31,6 @@
32
31
  "gulp-imagemin": "^3.2.0",
33
32
  "gulp-insert": "^0.5.0",
34
33
  "gulp-load-plugins": "^0.10.0",
35
- "gulp-md5": "^0.1.3",
36
34
  "gulp-minify": "0.0.14",
37
35
  "gulp-mocha-phantomjs": "^0.12.1",
38
36
  "gulp-plumber": "^1.1.0",