mod-build 3.6.73-beta.1 → 3.6.73-beta.3

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 3.6.73
4
4
 
5
- - Updating the `add-path-subdirectories` task to update paths that also start with `accessible-components`
5
+ - Updating `grab-shared-scripts` path to grab & replace the new, global `callrail.min.js` file
6
6
 
7
7
  ## 3.6.72
8
8
 
@@ -11,7 +11,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
11
11
  return `href="${pathSubdirectory}favicon.ico"`;
12
12
  }))
13
13
  .pipe(replace(/((src=")(images|scripts|shared-components)\/[^"]+")/g, function(match, path) {
14
- if (path.startsWith('src="images') || path.startsWith('src="scripts') || path.startsWith('src="shared-components') || path.startsWith('src="accessible-components')) {
14
+ if (path.startsWith('src="images') || path.startsWith('src="scripts') || path.startsWith('src="shared-components')) {
15
15
  return `src="${pathSubdirectory}${path.slice(5)}`;
16
16
  }
17
17
  return match;
@@ -23,7 +23,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
23
23
  return match;
24
24
  }))
25
25
  .pipe(replace(/((href=")(images|styles|shared-components)\/[^"]+")/g, function(match, path) {
26
- if (path.startsWith('href="images') || path.startsWith('href="styles') || path.startsWith('href="shared-components') || path.startsWith('src="accessible-components')) {
26
+ if (path.startsWith('href="images') || path.startsWith('href="styles') || path.startsWith('href="shared-components')) {
27
27
  return `href="${pathSubdirectory}${path.slice(6)}`;
28
28
  }
29
29
  return match;
@@ -13,7 +13,8 @@ const fileNames = {
13
13
  footerComponentJsFileName: '',
14
14
  modFooterStylesFileName: '',
15
15
  qsFooterStylesFileName: '',
16
- homeownerFormFileName: ''
16
+ homeownerFormFileName: '',
17
+ callrailFileName: ''
17
18
  };
18
19
  var isQuotePageOrUseRelativePath = false;
19
20
  var resourceURL = '';
@@ -29,9 +30,11 @@ function replaceModalyticsSrc(gulp, gulpPlugins, siteSettings, siteData) {
29
30
  function replaceFootAssetScripts(gulp, gulpPlugins, siteSettings, siteData) {
30
31
  const resourcePath = isQuotePageOrUseRelativePath ? `${pathSubdirectory}{{#if this.nodeModulesPath}}{{this.nodeModulesPath}}{{/if}}resources/scripts` : '/resources/scripts';
31
32
  return gulp.src(`${siteSettings.srcFolder}/${componentFolderPath}/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\/form.*?)js"/g, function(match) {
33
- if (match.includes('mod-form/form')) {
33
+ .pipe(replace(/"(?:(?!"|js")[\s\S])+(modutils|mod-utils.*?)js"|"(?:(?!"|")[\s\S])+(callrail.*?)js"|"(?:(?!"|")[\s\S])+(footer\/footer-component.*?)js"|"(?:(?!"|")[\s\S])+(mod-form\/form.*?)js"/g, function(match) {
34
+ if (match.includes('mod-form/form')) {
34
35
  return `"${resourcePath}/mod-form/form/${fileNames.homeownerFormFileName}"`;
36
+ } else if (match.includes('callrail')) {
37
+ return `"${resourcePath}/callrail/${fileNames.callrailFileName}"`;
35
38
  } else if (match.includes('modutils') || match.includes('mod-utils')) {
36
39
  return `"${resourcePath}/mod-utils/${fileNames.modUtilsFileName}"`;
37
40
  } else if (match.includes('footer-component')) {
@@ -140,6 +143,16 @@ function getResource(url, config = {}, fn, fnArray) {
140
143
  });
141
144
  }
142
145
  const TASKS = {
146
+ copyCallrail: {
147
+ url: 'shared-resources/scripts/callrail/callrail.min.js',
148
+ config: {
149
+ fileName: 'callrailFileName',
150
+ dest: 'scripts/callrail',
151
+ mapUrl: 'shared-resources/scripts/callrail/callrail.min.js.map',
152
+ },
153
+ srcReplaceFn: null,
154
+ additionalSrcReplaceFns: []
155
+ },
143
156
  copyModutils: {
144
157
  url: 'mod-utils/modutils.min.js',
145
158
  config: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.73-beta.1",
3
+ "version": "3.6.73-beta.3",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",