mod-build 3.6.36-beta.7 → 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.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,5 @@
1
1
  # Changelog
2
2
 
3
- ## 3.6.37
4
-
5
- - implementing a buffer to our `grab-shared-scripts` task, which fixes the hashing issue we were facing for our larger files. updated the hashing algorithm to MD5, so it matches our CircleCI CLI hash. updated `mod-form-beta.min.js` to `homeowner.min.js`
6
-
7
3
  ## 3.6.36
8
4
 
9
5
  - implementing fix needed for grabbing SVG sprites in our `grab-global-images` task. also removed consoles running in `grab-shared-scripts`
@@ -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
- homeownerFormFileName: ''
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.homeownerFormFileName}"`;
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 {
@@ -96,11 +95,9 @@ function getResource(url, config = {}, fn, fnArray) {
96
95
  throw new Error(`${resp.statusCode} Error while fetching ${file}`);
97
96
  }
98
97
  })
99
- .pipe(source(file))
100
- .pipe(buffer())
98
+ .pipe(source(`${file}`))
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) {
@@ -123,7 +120,7 @@ function getResource(url, config = {}, fn, fnArray) {
123
120
  }
124
121
  }
125
122
  })
126
- .pipe(source(file))
123
+ .pipe(source(`${file}`))
127
124
  .pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
128
125
  .on('finish', resolve);
129
126
  });
@@ -140,27 +137,27 @@ function getResource(url, config = {}, fn, fnArray) {
140
137
  }
141
138
  const TASKS = {
142
139
  copyModalytics: {
143
- url: 'mod-alytics/modalytics.min.js',
140
+ url: `mod-alytics/modalytics.min.js`,
144
141
  config: {
145
142
  fileName: 'modAlyticsFileName',
146
143
  dest: 'scripts/mod-alytics',
147
- mapUrl: 'mod-alytics/modalytics.min.js.map',
144
+ mapUrl: `mod-alytics/modalytics.min.js.map`,
148
145
  },
149
146
  srcReplaceFn: replaceModalyticsSrc,
150
147
  additionalSrcReplaceFns: []
151
148
  },
152
149
  copyModutils: {
153
- url: 'mod-utils/modutils.min.js',
150
+ url: `mod-utils/modutils.min.js`,
154
151
  config: {
155
152
  fileName: 'modUtilsFileName',
156
153
  dest: 'scripts/mod-utils',
157
- mapUrl: 'mod-utils/modutils.min.js.map',
154
+ mapUrl: `mod-utils/modutils.min.js.map`,
158
155
  },
159
156
  srcReplaceFn: null,
160
157
  additionalSrcReplaceFns: []
161
158
  },
162
159
  copyAbandonmentComponentStyles: {
163
- url: 'shared-resources/styles/components/abandonment/abandonment.min.css',
160
+ url: `shared-resources/styles/components/abandonment/abandonment.min.css`,
164
161
  config: {
165
162
  fileName: 'abandonmentStylesFileName',
166
163
  dest: 'styles/components/abandonment',
@@ -170,57 +167,47 @@ const TASKS = {
170
167
  additionalSrcReplaceFns: []
171
168
  },
172
169
  copyAbandonmentJs: {
173
- url: 'shared-resources/scripts/abandonment/abandonment.min.js',
170
+ url: `shared-resources/scripts/abandonment/abandonment.min.js`,
174
171
  config: {
175
172
  fileName: 'abandonmentJsFileName',
176
173
  dest: 'scripts/abandonment',
177
- mapUrl: 'shared-resources/scripts/abandonment/abandonment.min.js.map',
174
+ mapUrl: `shared-resources/scripts/abandonment/abandonment.min.js.map`,
178
175
  },
179
176
  srcReplaceFn: replaceAbandonmentJsCssSrc,
180
177
  additionalSrcReplaceFns: []
181
178
  },
182
179
  copyFooterComponentJs: {
183
- url: 'shared-resources/scripts/footer/footer-component.min.js',
180
+ url: `shared-resources/scripts/footer/footer-component.min.js`,
184
181
  config: {
185
182
  fileName: 'footerComponentJsFileName',
186
183
  dest: 'scripts/footer',
187
- mapUrl: 'shared-resources/scripts/footer/footer-component.min.js.map',
184
+ mapUrl: `shared-resources/scripts/footer/footer-component.min.js.map`,
188
185
  },
189
186
  srcReplaceFn: null,
190
187
  additionalSrcReplaceFns: []
191
188
  },
192
189
  copyModForm: {
193
- url: 'mod-form/mod-form.min.js',
190
+ url: `mod-form/mod-form.min.js`,
194
191
  config: {
195
192
  fileName: 'modFormFileName',
196
193
  dest: 'scripts/mod-form',
197
- mapUrl: 'mod-form/mod-form.min.js.map',
198
- },
199
- srcReplaceFn: null,
200
- additionalSrcReplaceFns: []
201
- },
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',
194
+ mapUrl: `mod-form/mod-form.min.js.map`,
208
195
  },
209
196
  srcReplaceFn: null,
210
197
  additionalSrcReplaceFns: []
211
198
  },
212
199
  copyQsForm: {
213
- url: 'mod-form/qs-form.min.js',
200
+ url: `mod-form/qs-form.min.js`,
214
201
  config: {
215
202
  fileName: 'qsFormFileName',
216
203
  dest: 'scripts/mod-form',
217
- mapUrl: 'mod-form/qs-form.min.js.map',
204
+ mapUrl: `mod-form/qs-form.min.js.map`,
218
205
  },
219
206
  srcReplaceFn: replaceFootAssetScripts,
220
207
  additionalSrcReplaceFns: []
221
208
  },
222
209
  copyModFooterComponentStyles: {
223
- url: 'shared-resources/styles/components/footer/mod-footer.min.css',
210
+ url: `shared-resources/styles/components/footer/mod-footer.min.css`,
224
211
  config: {
225
212
  fileName: 'modFooterStylesFileName',
226
213
  dest: 'styles/components/footer',
@@ -230,7 +217,7 @@ const TASKS = {
230
217
  additionalSrcReplaceFns: [replaceFooterStylesReference, replaceFooterStylesReferenceInMap]
231
218
  },
232
219
  copyQsFooterComponentStyles: {
233
- url: 'shared-resources/styles/components/footer/qs-footer.min.css',
220
+ url: `shared-resources/styles/components/footer/qs-footer.min.css`,
234
221
  config: {
235
222
  fileName: 'qsFooterStylesFileName',
236
223
  dest: 'styles/components/footer',
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.36-beta.7",
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",
@@ -18,7 +17,6 @@
18
17
  "gulp": "^3.9.1",
19
18
  "gulp-autoprefixer": "^3.1.1",
20
19
  "gulp-babel": "^8.0.0",
21
- "gulp-buffer": "0.0.2",
22
20
  "gulp-clean-css": "^3.0.4",
23
21
  "gulp-concat": "^2.6.1",
24
22
  "gulp-cssmin": "^0.1.7",