@videinfra/static-website-builder 1.6.0 → 1.6.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [1.6.1] - 2022-10-21
8
+ ### Fixed
9
+ - `false` task config being overwritten by empty array resulting in task being performed
10
+
7
11
  ## [1.6.0] - 2022-06-20
8
12
  ### Updated
9
13
  - gulp-sass to use latest node-sass version
package/lib/get-config.js CHANGED
@@ -85,6 +85,7 @@ function getTaskConfig (...path) {
85
85
  * @protected
86
86
  */
87
87
  function itterateConfig (config, fn) {
88
+ if (config === false) return false;
88
89
  const base = isPlainObject(config) ? {} : [];
89
90
 
90
91
  return reduce(config, (object, value, key) => {
@@ -111,7 +112,13 @@ function itterateConfig (config, fn) {
111
112
  function mergeConfigMode (config) {
112
113
  if ('production' in config || 'development' in config) {
113
114
  const mode = global.production ? 'production' : 'development';
114
- return omit(merge(config, config[mode]), ['production', 'development']);
115
+ const value = merge(config, config[mode]);
116
+
117
+ if (value !== false) {
118
+ return omit(value, ['production', 'development']);
119
+ } else {
120
+ return value;
121
+ }
115
122
  } else {
116
123
  return config;
117
124
  }
package/lib/merge.js CHANGED
@@ -17,7 +17,11 @@ function customizer (objValue, srcValue, key) {
17
17
  */
18
18
  module.exports = function merge (object, ...sources) {
19
19
  for (let i = 0; i < sources.length; i++) {
20
- object = mergeWith(object, sources[i], customizer);
20
+ if (sources[i] && typeof sources[i] === 'object') {
21
+ object = mergeWith(object, sources[i], customizer);
22
+ } else {
23
+ object = sources[i];
24
+ }
21
25
  }
22
26
  return object;
23
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videinfra/static-website-builder",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Customizable static site project builder",
5
5
  "license": "MIT",
6
6
  "engines": {