@videinfra/static-website-builder 1.13.0 → 1.13.2

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.13.1] - 2024-09-19
8
+ ### Added
9
+ - Fail whole gulp process when one of the tasks fail
10
+
7
11
  ## [1.13.0] - 2024-08-23
8
12
  ### Added
9
13
  - Added 'outpuSubFolder' property to entries configuration
@@ -5,5 +5,8 @@ const logError = require('../log-error');
5
5
  * Gulp task pipe function which handles errors
6
6
  */
7
7
  module.exports = function taskStart () {
8
- return plumber(logError);
8
+ return plumber(function (error) {
9
+ // Fail whole gulp process if in production mode
10
+ logError.call(this, error, global.production);
11
+ });
9
12
  }
package/lib/log-error.js CHANGED
@@ -1,15 +1,14 @@
1
1
  const chalk = require('chalk');
2
2
 
3
- module.exports = function (error) {
4
- if (error.plugin) {
5
- console.log('Error \'' + chalk.cyan(error.plugin) + '\' ' + chalk.red(error.message));
6
-
7
- } else {
8
- console.log(error.toString().split(': ').join(':\n'));
9
- }
3
+ module.exports = function (error, failOnError = false) {
4
+ console.log(chalk.red('Error') + ' in \'' + chalk.cyan(error.plugin || error.type) + '\'\nMessage:\n ' + (error.messageFormatted || error.message));
10
5
 
11
6
  // Emit the end event, to properly end the task
12
7
  if (typeof this.emit === 'function') {
13
8
  this.emit('end');
14
9
  }
10
+
11
+ if (failOnError) {
12
+ throw error;
13
+ }
15
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@videinfra/static-website-builder",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "Customizable static site project builder",
5
5
  "license": "MIT",
6
6
  "engines": {