@videinfra/static-website-builder 1.5.2 → 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 +10 -0
- package/lib/get-config.js +8 -1
- package/lib/merge.js +5 -1
- package/package.json +4 -2
- package/plugins/sass-engine/preprocess-config.js +2 -1
- package/plugins/sass.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ 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
|
+
|
|
11
|
+
## [1.6.0] - 2022-06-20
|
|
12
|
+
### Updated
|
|
13
|
+
- gulp-sass to use latest node-sass version
|
|
14
|
+
### Added
|
|
15
|
+
- `stylesheets.legacy` configuration option to turn off `node-sass` and use `sass`
|
|
16
|
+
|
|
7
17
|
## [1.5.2] - 2022-06-17
|
|
8
18
|
### Updated
|
|
9
19
|
- In build mode prevent data from being read more than once
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Customizable static site project builder",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"gulp-ignore": "^3.0.0",
|
|
44
44
|
"gulp-plumber": "^1.2.1",
|
|
45
45
|
"gulp-postcss": "^8.0.0",
|
|
46
|
-
"gulp-sass": "^
|
|
46
|
+
"gulp-sass": "^5.1.0",
|
|
47
47
|
"gulp-sizereport": "^1.2.1",
|
|
48
48
|
"gulp-sourcemaps": "^3.0.0",
|
|
49
49
|
"gulp-svgmin": "^4.1.0",
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
"gulp-twig": "^1.2.0",
|
|
52
52
|
"minimist": "^1.2.6",
|
|
53
53
|
"nano-memoize": "^1.3.0",
|
|
54
|
+
"node-sass": "^7.0.1",
|
|
55
|
+
"sass": "^1.52.3",
|
|
54
56
|
"webpack": "^4.46.0",
|
|
55
57
|
"webpack-stream": "^5.2.1"
|
|
56
58
|
},
|
|
@@ -2,7 +2,7 @@ const paths = require('./../../lib/get-path');
|
|
|
2
2
|
const getConfig = require('./../../lib/get-config');
|
|
3
3
|
const getPaths = require('./../../lib/get-path');
|
|
4
4
|
const assign = require('lodash/assign');
|
|
5
|
-
const
|
|
5
|
+
const gulpSass = require('gulp-sass');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -22,6 +22,7 @@ module.exports = function processSASSConfig (config, fullConfig) {
|
|
|
22
22
|
|
|
23
23
|
// Engine is a function which returns a gulp pipe function
|
|
24
24
|
config.engine = function getSASSEngine () {
|
|
25
|
+
const sass = config.legacy ? gulpSass(require('node-sass')) : gulpSass(require('sass'));
|
|
25
26
|
return sass(getConfig.getTaskConfig('stylesheets', 'sass')).on('error', sass.logError)
|
|
26
27
|
};
|
|
27
28
|
|
package/plugins/sass.js
CHANGED