@videinfra/static-website-builder 1.13.2 → 1.13.4
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 +4 -0
- package/bin/builder.js +6 -1
- package/lib/log-error.js +6 -5
- package/package.json +1 -1
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.13.4] - 2024-10-08
|
|
8
|
+
### Fixed
|
|
9
|
+
- Fail gulp process when htmlmin task fails
|
|
10
|
+
|
|
7
11
|
## [1.13.1] - 2024-09-19
|
|
8
12
|
### Added
|
|
9
13
|
- Fail whole gulp process when one of the tasks fail
|
package/bin/builder.js
CHANGED
|
@@ -25,5 +25,10 @@ if (additionalArgs[0] === 'init') {
|
|
|
25
25
|
args = args.concat('--tasks', '');
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
require('child_process')
|
|
28
|
+
require('child_process')
|
|
29
|
+
.fork(gulpBinaryFile, args)
|
|
30
|
+
.on('exit', function(code){
|
|
31
|
+
// Exit with error if child process exited with an error
|
|
32
|
+
process.exit(code);
|
|
33
|
+
});
|
|
29
34
|
}
|
package/lib/log-error.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
const chalk = require('chalk');
|
|
2
2
|
|
|
3
3
|
module.exports = function (error, failOnError = false) {
|
|
4
|
-
|
|
4
|
+
const message = String(error.messageFormatted || error.message);
|
|
5
|
+
const messageTrimmed = message.length > 4096 ? message.slice(0, 512) + '...' : message;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
if (typeof this.emit === 'function') {
|
|
8
|
-
this.emit('end');
|
|
9
|
-
}
|
|
7
|
+
console.log(chalk.red('Error') + ' in \'' + chalk.cyan(error.plugin || error.type) + '\'\nMessage:\n ' + messageTrimmed);
|
|
10
8
|
|
|
11
9
|
if (failOnError) {
|
|
12
10
|
throw error;
|
|
11
|
+
} else if (typeof this.emit === 'function') {
|
|
12
|
+
// Emit the end event, to properly end the task
|
|
13
|
+
this.emit('end');
|
|
13
14
|
}
|
|
14
15
|
}
|