mod-build 3.6.1--beta.22 → 3.6.1--beta.24

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.
@@ -1,32 +1,5 @@
1
- var request = require('request');
2
- var source = require('vinyl-source-stream');
3
-
4
- function getDefinedSeasons(gulp, gulpPlugins, siteSettings) {
5
- return {
6
- "warmerWeather": {
7
- "firstDay": "03-14",
8
- "lastDay": "09-25"
9
- },
10
- "spookySeason": {
11
- "startDate": "10-01",
12
- "endDate": "10-31"
13
- }
14
- }
15
- // return new Promise(resolve => { // eslint-disable-line no-undef
16
- // request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/data/seasons.json`)
17
- // .on('response', resp => {
18
- // if (resp.statusCode !== 200) {
19
- // throw new Error(`${resp.statusCode} Error while fetching data/seasons.json`);
20
- // }
21
- // })
22
- // .pipe(source('seasons'))
23
- // .then(seasons => { return seasons } )
24
- // .on('finish', resolve);
25
- // });
26
- }
27
-
28
1
  function getActiveSeasons() {
29
- var seasons = getDefinedSeasons();
2
+ var seasons = require(`../src/data/seasons.js`);
30
3
  const today = new Date();
31
4
  const year = today.getFullYear();
32
5
  let activeSeason = [];
@@ -45,4 +18,4 @@ function getActiveSeasons() {
45
18
  return activeSeason;
46
19
  }
47
20
 
48
- module.exports = getActiveSeasons;
21
+ module.exports = getActiveSeasons;
@@ -14,7 +14,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
14
14
 
15
15
  // Checking for seasonal variations in the template.js + updating content
16
16
  var checkSeasonalVariations = require('./check-seasonal-variations.js');
17
- const activeSeason = checkSeasonalVariations(siteSettings);
17
+ const activeSeason = checkSeasonalVariations();
18
18
  if (activeSeason !== ''){
19
19
  if (activeSeason in siteData.seasonalVariations) {
20
20
  siteData = {...siteData, ...siteData.seasonalVariations[activeSeason]};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.1--beta.22",
3
+ "version": "3.6.1--beta.24",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -51,7 +51,7 @@
51
51
  "imagemin-webp": "^5.1.0",
52
52
  "jquery": "^3.2.1",
53
53
  "lodash": "^4.17.15",
54
- "node-fetch": "^2.6.7",
54
+ "lodash.merge": "^4.6.2",
55
55
  "nouislider": "^10.1.0",
56
56
  "request": "^2.88.0",
57
57
  "run-sequence": "^2.2.1",
@@ -0,0 +1,12 @@
1
+ var seasons = {
2
+ "warmerWeather": {
3
+ "firstDay": "03-14",
4
+ "lastDay": "09-25"
5
+ },
6
+ "spookySeason": {
7
+ "startDate": "10-01",
8
+ "endDate": "10-31"
9
+ }
10
+ }
11
+
12
+ module.exports = seasons;