mod-build 3.7.21-beta.1 → 3.7.21

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.7.21
4
4
 
5
- - Added extra conditions for `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to not break when required data is not passed.
5
+ - Added `GUTTERS` & `GUTTER_COVERS` to the `addTcpaAboveCta` and `addTcpaBelowCta` configurations.
6
6
 
7
7
  ## 3.7.20
8
8
 
@@ -94,6 +94,8 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
94
94
  return result;
95
95
  };
96
96
 
97
+ var tradesWithTcpaAboveCta = ['SOLAR', 'HOME_SECURITY', 'GUTTERS', 'GUTTER_COVERS'];
98
+
97
99
  // Support helper functions
98
100
  var handlebarsHelpers = [
99
101
  // Run any js line
@@ -229,21 +231,16 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
229
231
  {
230
232
  name: 'addTcpaAboveCta',
231
233
  fn: function(page) {
232
- if (!page || !page.primary_trade) {
233
- return false;
234
- }
235
- const trade = page.primary_trade.toUpperCase();
236
- return trade === 'SOLAR' || trade === 'HOME_SECURITY' || page.isBranded;
234
+ const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
235
+ return tradesWithTcpaAboveCta.includes(trade) || page.isBranded;
237
236
  }
238
237
  },
239
238
  {
240
239
  name: 'addTcpaBelowCta',
241
240
  fn: function(page) {
242
- if (!page || !page.primary_trade) {
243
- return false;
244
- }
245
- const trade = page.primary_trade.toUpperCase();
246
- return trade !== 'SOLAR' && trade !== 'HOME_SECURITY' && !page.isBranded;
241
+ const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
242
+
243
+ return !tradesWithTcpaAboveCta.includes(trade) && !page.isBranded;
247
244
  }
248
245
  }
249
246
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.7.21-beta.1",
3
+ "version": "3.7.21",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",