mod-build 3.6.94-beta.6 → 3.6.94-beta.8

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.
@@ -23,11 +23,13 @@ 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
31
  const heating = '(Heating|heating|calentadores|Calentadores|calefactores|Calefactores)';
30
- const and = '(\s&\s|\sand\s|and|\sy\s)'; // eslint-disable-line no-useless-escape
32
+ const and = '(\\s&\\s|\\sand\\s|and|\\sy\\s)'; // eslint-disable-line no-useless-escape
31
33
  const ac = '(AC|Cooling|cooling|aires.*?acondicionados|Aires.*?Acondicionados)';
32
34
  const spaces = '.*?';
33
35
 
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.94-beta.6",
3
+ "version": "3.6.94-beta.8",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",