mod-build 3.6.36-beta.1 → 3.6.36-beta.2

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.
@@ -28,7 +28,7 @@ function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
28
28
  function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
29
29
  const resourcePath = isQuotePageOrUseRelativePath ? '{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts' : '/resources/scripts';
30
30
  return gulp.src(siteSettings.srcFolder + '/shared-components/foot-assets/foot-assets.html')
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) {
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.*?)js"/g, function(match) {
32
32
  if (match.includes('mod-form')) {
33
33
  if (match.includes('mod-form/form')) {
34
34
  return `"${resourcePath}/mod-form/form/${fileNames.homeownerFormFileName}"`;
@@ -89,21 +89,18 @@ function getResource(url, config = {}, fn, fnArray) {
89
89
 
90
90
  return new Promise(resolve => {
91
91
  const file = getFileFromURL(url);
92
- const doNotAddHash = ['mod-form-beta.min.js']
93
- let stream = request(`${resourceURL}/${url}`)
92
+ request(`${resourceURL}/${url}`)
94
93
  .on('response', resp => {
95
94
  if (resp.statusCode !== 200) {
96
95
  throw new Error(`${resp.statusCode} Error while fetching ${file}`);
97
96
  }
98
97
  })
99
98
  .pipe(source(`${file}`))
100
- if (!doNotAddHash.includes(file)) {
101
- stream = stream.pipe(hash({
102
- hashLength: 20,
103
- template: file.replace(/^([^.]*)\.(.*)$/, '$1-<%= hash %>.$2')
104
- }))
105
- }
106
- stream.pipe(tap(function(file, t) {
99
+ .pipe(hash({
100
+ hashLength: 20,
101
+ template: file.replace(/^([^.]*)\.(.*)$/, '$1-<%= hash %>.$2')
102
+ }))
103
+ .pipe(tap(function(file, t) {
107
104
  fileNames[config.fileName] = path.basename(file.path);
108
105
  }))
109
106
  .pipe(config.gulp.dest(`${config.siteSettings.srcFolder}/resources/${config.dest}`))
@@ -259,6 +256,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
259
256
  });
260
257
  }
261
258
 
259
+ console.log('calling this')
262
260
  return Promise.all(getAllResources);
263
261
  }());
264
262
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.36-beta.1",
3
+ "version": "3.6.36-beta.2",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -15,6 +15,7 @@
15
15
  "bootstrap-sass": "^3.4.3",
16
16
  "browser-sync": "^2.18.6",
17
17
  "del": "^3.0.0",
18
+ "es6-promise": "^2.1.1",
18
19
  "fancy-log": "^2.0.0",
19
20
  "gulp": "^3.9.1",
20
21
  "gulp-autoprefixer": "^3.1.1",
@@ -56,7 +57,9 @@
56
57
  "imagemin-webp": "^5.1.0",
57
58
  "jquery": "^3.2.1",
58
59
  "lodash": "^4.17.15",
60
+ "lodash.assign": "^2.4.1",
59
61
  "lodash.merge": "^4.6.2",
62
+ "lodash.template": "^2.4.1",
60
63
  "nouislider": "^10.1.0",
61
64
  "path": "^0.12.7",
62
65
  "plugin-error": "^2.0.1",
@@ -64,7 +67,8 @@
64
67
  "run-sequence": "^2.2.1",
65
68
  "sass": "^1.49.9",
66
69
  "should": "^11.2.1",
67
- "through2": "^4.0.2",
70
+ "through2": "^2.0.0",
71
+ "vinyl": "^2.2.1",
68
72
  "vinyl-source-stream": "^2.0.0",
69
73
  "webpack-stream": "^5.2.1"
70
74
  },