mod-build 3.6.1--beta.10 → 3.6.1--beta.12
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
CHANGED
|
@@ -12,9 +12,9 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
12
12
|
var qsFooterData = require('../src/data/components/qs-footer.js');
|
|
13
13
|
var quoteFooterData = require('../src/data/components/quote-footer.js');
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var { makeSeasonalUpdate } = require('../src/scripts/components/make-seasonal-updates.js');
|
|
16
16
|
|
|
17
|
-
var templatesData = Object.assign(commonData(), qsFooterData(siteData), quoteFooterData(siteData), siteData, { isLocal, nodeEnv, assetsPath, buildPath });
|
|
17
|
+
var templatesData = Object.assign(commonData(), qsFooterData(siteData), quoteFooterData(siteData), siteData, { isLocal, nodeEnv, assetsPath, buildPath, makeSeasonalUpdates });
|
|
18
18
|
|
|
19
19
|
// This is helper function to evaluate JS expressions
|
|
20
20
|
// in Handlebars, e.g. for conditions
|
package/package.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @returns {Boolean} - if true = update verbiage
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
var makeSeasonalUpdates = function
|
|
7
|
-
|
|
6
|
+
var makeSeasonalUpdates = function(trade) {
|
|
7
|
+
var trade = siteData.primary_trade;
|
|
8
8
|
const today = new Date();
|
|
9
9
|
const year = today.getFullYear();
|
|
10
10
|
// if (trade === 'HVAC') {
|
|
@@ -15,7 +15,5 @@ var makeSeasonalUpdates = function () {
|
|
|
15
15
|
const springDate = new Date(`03-14-${year}`);
|
|
16
16
|
const fallDate = new Date(`09-25-${year}`);
|
|
17
17
|
|
|
18
|
-
// document.write(trade);
|
|
19
|
-
|
|
20
18
|
return !(today > springDate && today < fallDate);
|
|
21
19
|
}
|