mod-build 3.6.94-beta.5 → 3.6.94-beta.7
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/gulp-tasks/templates.js +6 -4
- package/package.json +1 -1
package/gulp-tasks/templates.js
CHANGED
|
@@ -23,12 +23,14 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
23
23
|
const SEASON = 'warmerWeather';
|
|
24
24
|
const CENTRAL_AC = 'Central AC';
|
|
25
25
|
const CENTRAL_HEATING = 'Central Heating';
|
|
26
|
+
siteData.isWarmWeather = false; // will use this variable in site level to update the hero title/subtitle wherever required
|
|
26
27
|
if (activeSeason.length !== 0) {
|
|
27
28
|
if (activeSeason.includes(SEASON)) {
|
|
29
|
+
siteData.isWarmWeather = true;
|
|
28
30
|
const data = JSON.stringify(siteData, null, 4);
|
|
29
|
-
const heating = '(Heating|calentadores)';
|
|
30
|
-
const and = '(
|
|
31
|
-
const ac = '(AC|Cooling|aires.*?acondicionados)';
|
|
31
|
+
const heating = '(Heating|heating|calentadores|Calentadores|calefactores|Calefactores)';
|
|
32
|
+
const and = '(\s&\s|\sand\s|and|\sy\s)'; // eslint-disable-line no-useless-escape
|
|
33
|
+
const ac = '(AC|Cooling|cooling|aires.*?acondicionados|Aires.*?Acondicionados)';
|
|
32
34
|
const spaces = '.*?';
|
|
33
35
|
|
|
34
36
|
const regex = new RegExp(`${heating}${spaces}${and}${spaces}${ac}`, 'gm');
|
|
@@ -48,7 +50,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
48
50
|
const lastOption = field.options[field.options.length - 1];
|
|
49
51
|
const firstOptionIsCentralHeating = (firstOption.attributes && firstOption.attributes.value === CENTRAL_HEATING) || firstOption.value === CENTRAL_HEATING;
|
|
50
52
|
const lastOptionIsCentralAC = (lastOption.attributes && lastOption.attributes.value === CENTRAL_AC) || lastOption.value === CENTRAL_AC;
|
|
51
|
-
|
|
53
|
+
// if the first option is central heating & last option is central ac then only swap those options
|
|
52
54
|
if (firstOptionIsCentralHeating && lastOptionIsCentralAC) {
|
|
53
55
|
field.options[0] = lastOption;
|
|
54
56
|
field.options[field.options.length - 1] = firstOption;
|