mod-build 3.6.1--beta.15 → 3.6.1--beta.17
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 +11 -9
- package/package.json +1 -1
package/gulp-tasks/templates.js
CHANGED
|
@@ -66,20 +66,22 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
+
// Check to see if seasonal updates
|
|
69
70
|
{
|
|
70
|
-
name: '
|
|
71
|
-
fn: function(season) {
|
|
72
|
-
var trade = siteData.primary_trade;
|
|
71
|
+
name: 'ifSeason',
|
|
72
|
+
fn: function(season, block) {
|
|
73
73
|
const today = new Date();
|
|
74
74
|
const year = today.getFullYear();
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const fallDate = new Date(`09-25-${year}`);
|
|
75
|
+
const startOfSpring = new Date(`03-14-${year}`);
|
|
76
|
+
const startOfFall = new Date(`09-25-${year}`);
|
|
77
|
+
let isSeason = false;
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
switch(season) {
|
|
80
|
+
case 'coolerWeather':
|
|
81
|
+
isSeason = !(today > startOfSpring && today < startOfFall);
|
|
82
|
+
break
|
|
81
83
|
}
|
|
82
|
-
|
|
84
|
+
return isSeason ? block.fn(this) : block.fn(this);
|
|
83
85
|
}
|
|
84
86
|
},
|
|
85
87
|
// Convert string to uppercase
|