mod-build 3.7.20 → 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 +4 -0
- package/gulp-tasks/templates.js +7 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.7.21
|
|
4
|
+
|
|
5
|
+
- Added `GUTTERS` & `GUTTER_COVERS` to the `addTcpaAboveCta` and `addTcpaBelowCta` configurations.
|
|
6
|
+
|
|
3
7
|
## 3.7.20
|
|
4
8
|
|
|
5
9
|
- Added `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to determine where tcpa should be placed based on trade/branded conditions.
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -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,15 +231,16 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
229
231
|
{
|
|
230
232
|
name: 'addTcpaAboveCta',
|
|
231
233
|
fn: function(page) {
|
|
232
|
-
const trade = page.primary_trade.toUpperCase();
|
|
233
|
-
return trade
|
|
234
|
+
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
235
|
+
return tradesWithTcpaAboveCta.includes(trade) || page.isBranded;
|
|
234
236
|
}
|
|
235
237
|
},
|
|
236
238
|
{
|
|
237
239
|
name: 'addTcpaBelowCta',
|
|
238
240
|
fn: function(page) {
|
|
239
|
-
const trade = page.primary_trade.toUpperCase();
|
|
240
|
-
|
|
241
|
+
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
242
|
+
|
|
243
|
+
return !tradesWithTcpaAboveCta.includes(trade) && !page.isBranded;
|
|
241
244
|
}
|
|
242
245
|
}
|
|
243
246
|
];
|