mod-build 3.6.1--beta.4 → 3.6.1--beta.6
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 makeSeasonalUpdates = require('../src/scripts/components/make-seasonal-updates.js');
|
|
15
|
+
var { makeSeasonalUpdates } = require('../src/scripts/components/make-seasonal-updates.js');
|
|
16
16
|
|
|
17
|
-
var templatesData = Object.assign(commonData(),
|
|
17
|
+
var templatesData = Object.assign(commonData(), qsFooterData(siteData), quoteFooterData(siteData), siteData, { isLocal, nodeEnv, assetsPath, buildPath });
|
|
18
18
|
|
|
19
19
|
// This is helper function to evaluate JS expressions
|
|
20
20
|
// in Handlebars, e.g. for conditions
|
package/package.json
CHANGED
|
@@ -8,10 +8,17 @@ function makeSeasonalUpdates(siteData) {
|
|
|
8
8
|
const today = new Date();
|
|
9
9
|
const year = today.getFullYear();
|
|
10
10
|
if (trade === 'HVAC') {
|
|
11
|
-
|
|
12
|
-
const springDate = new Date(`03-14-${year}`);
|
|
13
|
-
const fallDate = new Date(`09-25-${year}`);
|
|
14
|
-
|
|
15
|
-
return !(today > springDate && today < fallDate);
|
|
11
|
+
|
|
16
12
|
}
|
|
13
|
+
|
|
14
|
+
/* Default Hightlight Cooling Services; Highlight Heating Services from September 25 to March 14 */
|
|
15
|
+
const springDate = new Date(`03-14-${year}`);
|
|
16
|
+
const fallDate = new Date(`09-25-${year}`);
|
|
17
|
+
|
|
18
|
+
document.write(trade);
|
|
19
|
+
document.write(siteData);
|
|
20
|
+
|
|
21
|
+
return !(today > springDate && today < fallDate);
|
|
17
22
|
}
|
|
23
|
+
|
|
24
|
+
makeSeasonalUpdates(siteData);
|