mod-build 3.7.4 → 3.7.6

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,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.6
4
+
5
+ - Removing all the `!window.Modalytics.privacyPreferencesDetected` conditionals (as we are no longer moving forward with this integration).
6
+
7
+ ## 3.7.5
8
+
9
+ - fixed trade directory name issue for section deals pages
10
+
3
11
  ## 3.7.4
4
12
 
5
13
  - Added small enhancements in `grab-mhsadmin-data`
@@ -194,7 +194,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
194
194
 
195
195
  const _insertTrade = function(htmlString) {
196
196
  const markup = gulpPlugins.htmlParser.parse(htmlString);
197
- markup.querySelector('.btn--zip').setAttribute('data-service', trade.slug);
197
+ markup.querySelector('.btn--zip').setAttribute('data-service', trade.slug.toLowerCase().replaceAll(/[-|\s]/ig, '_'));
198
198
  markup.querySelector('.trade').textContent = trade.displayName;
199
199
  return markup;
200
200
  };
@@ -247,20 +247,20 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
247
247
  trade = '${trade}'
248
248
  }}{{/page.articlesConfig.articlesWithContractors.${trade}.${pageName}}}`;
249
249
  // make the directory by trade name
250
- fs.mkdir(`${templatesPath}/${siteDetails.homepage}/${trade}/`, { recursive: true }, async function(error) {
250
+ fs.mkdir(`${templatesPath}/${siteDetails.homepage}/${articleData.data.trade.slug}/`, { recursive: true }, async function(error) {
251
251
  if (error) {
252
252
  throw error;
253
253
  }
254
- fs.writeFile(`${templatesPath}/${siteDetails.homepage}/${trade}/index.html`, tradeHubFileContent, function(err) {
254
+ fs.writeFile(`${templatesPath}/${siteDetails.homepage}/${articleData.data.trade.slug}/index.html`, tradeHubFileContent, function(err) {
255
255
  if (err) {
256
256
  throw err;
257
257
  }
258
- fs.writeFile(`${templatesPath}/${siteDetails.homepage}/${trade}/${fileName}.html`, fileContent, function($err) {
258
+ fs.writeFile(`${templatesPath}/${siteDetails.homepage}/${articleData.data.trade.slug}/${fileName}.html`, fileContent, function($err) {
259
259
  if ($err) {
260
260
  throw $err;
261
261
  }
262
262
  templatesCount++;
263
- log.info(`Article template ${templatesCount?.toString()?.padStart(2, '0')}: ${templatesPath}${trade}/${siteDetails.homepage}/${fileName}.html`);
263
+ log.info(`Article template ${templatesCount?.toString()?.padStart(2, '0')}: ${templatesPath}${articleData.data.trade.slug}/${siteDetails.homepage}/${fileName}.html`);
264
264
  if (articleConfigsCount === templatesCount) {
265
265
  siteData.page.lastMod = formatDate(new Date().toLocaleDateString(dateLocalString, lastModDateOptions));
266
266
  done();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.7.4",
3
+ "version": "3.7.6",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -256,7 +256,7 @@
256
256
  }
257
257
  };
258
258
 
259
- if (window.Modalytics && !window.Modalytics.privacyPreferencesDetected) {
259
+ if (window.Modalytics) {
260
260
  heapUserTracking.init();
261
261
  }
262
262
  })();
@@ -1,4 +1,4 @@
1
- if (window.Modalytics && !window.Modalytics.privacyPreferencesDetected) {
1
+ if (window.Modalytics) {
2
2
  var heapIsDevEnv = window.location.host.match(new RegExp('(' + ['qa.', 'staging.', 'localhost', '.local', '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}'].join('|') + ')', 'i'));
3
3
  // dev env id "3986615799"
4
4
  if (!heapIsDevEnv) {
@@ -20,7 +20,7 @@ _vis_opt_queue.push(function() {
20
20
  // Use the _vis_data object created above to fetch the data,
21
21
  // key of the object is the Test ID and the value is Variation Name
22
22
  if (_vis_counter) {
23
- if (window.Modalytics && !window.Modalytics.privacyPreferencesDetected && window.heap && window.heap.appid) {
23
+ if (window.Modalytics && window.heap && window.heap.appid) {
24
24
  heap.addUserProperties(window._vis_data);
25
25
  }
26
26
  }