balm-core 3.21.0 → 3.22.0

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.
@@ -105,10 +105,10 @@ var externals = ''; // Stats
105
105
 
106
106
  var stats = {
107
107
  colors: true,
108
+ assets: true,
109
+ children: false,
108
110
  chunks: false,
109
- chunkModules: false,
110
- modules: false,
111
- children: false
111
+ modules: false
112
112
  };
113
113
  /**
114
114
  * Full custom webpack configuration
@@ -36,7 +36,8 @@ var SassTask = /*#__PURE__*/function (_BalmJS$BalmStyleTask) {
36
36
  get: function get() {
37
37
  return Object.assign({
38
38
  includePaths: BalmJS.file.stylePaths,
39
- outputStyle: 'expanded'
39
+ outputStyle: 'expanded',
40
+ quietDeps: BalmJS.config.logs.level < BalmJS.LogLevel.Warn
40
41
  }, BalmJS.config.styles.sassOptions, this.customOptions);
41
42
  }
42
43
  }, {
@@ -51,20 +51,23 @@ var WebpackTask = /*#__PURE__*/function (_BalmJS$BalmTask) {
51
51
  _compiling["default"].start();
52
52
 
53
53
  BalmJS.webpackCompiler = (0, _webpack.webpack)((0, _webpack.webpackConfig)(_this.input, _this.output, customOptions, isHook), function (error, stats) {
54
- _compiling["default"].stop(); // Handle errors here
55
- // if (error) {
56
- // BalmJS.logger.error(`${this.name} task`, error.stack || error);
57
- // if (error.details) {
58
- // BalmJS.logger.error(`${this.name} task`, error.details);
59
- // }
60
- // return;
61
- // }
54
+ _compiling["default"].stop();
62
55
 
56
+ try {
57
+ var scriptLogLevel = stats.hasErrors() ? BalmJS.LogLevel.Error : stats.hasWarnings() ? BalmJS.LogLevel.Warn : BalmJS.LogLevel.Info;
63
58
 
64
- var scriptLogLevel = stats.hasErrors() ? BalmJS.LogLevel.Error : stats.hasWarnings() ? BalmJS.LogLevel.Warn : BalmJS.LogLevel.Info;
59
+ if (BalmJS.config.logs.level <= scriptLogLevel) {
60
+ console.log(stats.toString(BalmJS.config.scripts.stats));
61
+ }
62
+ } catch (e) {
63
+ // Handle errors here
64
+ BalmJS.logger.error("".concat(_this.name, " task"), error.stack || error);
65
65
 
66
- if (BalmJS.config.logs.level <= scriptLogLevel) {
67
- console.log(stats.toString(BalmJS.config.scripts.stats));
66
+ if (error.details) {
67
+ BalmJS.logger.error("".concat(_this.name, " task"), error.details);
68
+ }
69
+
70
+ return;
68
71
  }
69
72
 
70
73
  fn && fn(); // Done processing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balm-core",
3
- "version": "3.21.0",
3
+ "version": "3.22.0",
4
4
  "description": "BalmJS compiler core",
5
5
  "keywords": [
6
6
  "balm",
@@ -47,7 +47,7 @@
47
47
  "browser-sync": "^2.27.7",
48
48
  "connect-history-api-fallback": "^1.6.0",
49
49
  "css-loader": "5",
50
- "cssnano": "^5.0.15",
50
+ "cssnano": "^5.0.17",
51
51
  "del": "^6.0.0",
52
52
  "esbuild": "^0.14",
53
53
  "fancy-log": "^2.0.0",
@@ -73,9 +73,9 @@
73
73
  "optimize-css-assets-webpack-plugin": "^6.0.1",
74
74
  "parents": "^1.0.1",
75
75
  "plugin-error": "^1.0.1",
76
- "postcss": "^8.4.5",
76
+ "postcss": "^8.4.6",
77
77
  "postcss-import": "^14.0.2",
78
- "postcss-load-config": "^3.1.1",
78
+ "postcss-load-config": "^3.1.2",
79
79
  "postcss-loader": "4",
80
80
  "postcss-preset-env": "6",
81
81
  "postcss-safe-parser": "5",
@@ -83,7 +83,7 @@
83
83
  "readable-stream": "^3.6.0",
84
84
  "replace-ext": "^2.0.0",
85
85
  "require-dir": "^1.2.0",
86
- "rollup": "^2.64.0",
86
+ "rollup": "^2.67.2",
87
87
  "rollup-plugin-terser": "^7.0.2",
88
88
  "sass": "1.39.2",
89
89
  "ssh2": "0.8.9",
@@ -105,7 +105,7 @@
105
105
  },
106
106
  "devDependencies": {
107
107
  "@types/express": "^4.17.13",
108
- "@types/node": "^17.0.8",
108
+ "@types/node": "17.0.13",
109
109
  "@types/webpack": "4"
110
110
  },
111
111
  "optionalDependencies": {
@@ -117,5 +117,5 @@
117
117
  "engines": {
118
118
  "node": ">=10.13.0"
119
119
  },
120
- "gitHead": "6b13ad753b6a6d20435a5a80d3f703c3f1a4820c"
120
+ "gitHead": "14c8b31a8a1a7d353c91a1d314a84e83028ae0f0"
121
121
  }
@@ -42,10 +42,10 @@ const target = 'web';
42
42
  const externals = '';
43
43
  const stats = {
44
44
  colors: true,
45
+ assets: true,
46
+ children: false,
45
47
  chunks: false,
46
- chunkModules: false,
47
- modules: false,
48
- children: false
48
+ modules: false
49
49
  };
50
50
  const webpackOptions = {};
51
51
  const optimization = {};
@@ -7,7 +7,8 @@ class SassTask extends BalmJS.BalmStyleTask {
7
7
  get options() {
8
8
  return Object.assign({
9
9
  includePaths: BalmJS.file.stylePaths,
10
- outputStyle: 'expanded'
10
+ outputStyle: 'expanded',
11
+ quietDeps: BalmJS.config.logs.level < BalmJS.LogLevel.Warn
11
12
  }, BalmJS.config.styles.sassOptions, this.customOptions);
12
13
  }
13
14
  recipe(input, output, options = {}) {
@@ -14,13 +14,22 @@ class WebpackTask extends BalmJS.BalmTask {
14
14
  compiling_1.default.start();
15
15
  BalmJS.webpackCompiler = (0, webpack_1.webpack)((0, webpack_1.webpackConfig)(this.input, this.output, customOptions, isHook), (error, stats) => {
16
16
  compiling_1.default.stop();
17
- const scriptLogLevel = stats.hasErrors()
18
- ? BalmJS.LogLevel.Error
19
- : stats.hasWarnings()
20
- ? BalmJS.LogLevel.Warn
21
- : BalmJS.LogLevel.Info;
22
- if (BalmJS.config.logs.level <= scriptLogLevel) {
23
- console.log(stats.toString(BalmJS.config.scripts.stats));
17
+ try {
18
+ const scriptLogLevel = stats.hasErrors()
19
+ ? BalmJS.LogLevel.Error
20
+ : stats.hasWarnings()
21
+ ? BalmJS.LogLevel.Warn
22
+ : BalmJS.LogLevel.Info;
23
+ if (BalmJS.config.logs.level <= scriptLogLevel) {
24
+ console.log(stats.toString(BalmJS.config.scripts.stats));
25
+ }
26
+ }
27
+ catch (e) {
28
+ BalmJS.logger.error(`${this.name} task`, error.stack || error);
29
+ if (error.details) {
30
+ BalmJS.logger.error(`${this.name} task`, error.details);
31
+ }
32
+ return;
24
33
  }
25
34
  fn && fn();
26
35
  callback();