@ray-js/builder-mp 0.6.22-beta-2 → 0.6.25

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.
@@ -10,7 +10,7 @@ declare class Builder {
10
10
  initWebpack(cfg: Config): Compiler;
11
11
  run(entries: any): void;
12
12
  config(config: Config): void;
13
- print: (stats: Stats[]) => void;
13
+ print: (prefix: string, stats: Stats[]) => void;
14
14
  parentDoneHook(): void;
15
15
  rjsDoneHook(): void;
16
16
  createWebpackHook(): void;
package/lib/build.rjs.js CHANGED
@@ -48,23 +48,23 @@ class Builder {
48
48
  this.createWebpackHook();
49
49
  this.extractRjsModuleHook();
50
50
  };
51
- this.print = (stats) => {
52
- const assets = stats.reduce((a, s) => { var _a; return (a.concat(((_a = s.toJson()) === null || _a === void 0 ? void 0 : _a.assets) || []), a); }, []);
53
- const size = assets.reduce((acc, asset) => {
54
- return acc + asset.size;
55
- }, 0);
56
- stats.forEach((s) => {
57
- console.log(s.toString({
58
- colors: true,
59
- entrypoints: false,
60
- assets: this.compileOptions.watch ? false : true,
61
- children: false,
62
- modules: false,
63
- }));
51
+ this.print = (prefix, stats) => {
52
+ setTimeout(() => {
53
+ const assets = stats.reduce((a, s) => { var _a; return ((a = a.concat(((_a = s.toJson()) === null || _a === void 0 ? void 0 : _a.assets) || [])), a); }, []);
54
+ const size = assets.reduce((acc, asset) => acc + asset.size, 0);
55
+ stats.forEach((s) => {
56
+ console.log(s.toString({
57
+ colors: true,
58
+ entrypoints: false,
59
+ assets: this.compileOptions.watch ? false : true,
60
+ children: false,
61
+ modules: false,
62
+ }));
63
+ });
64
+ console.log('');
65
+ shared_1.log.info(prefix, `Output size ${size} bytes`.yellow, (0, pretty_bytes_1.default)(size).bgMagenta.white);
66
+ console.log('');
64
67
  });
65
- console.log('');
66
- shared_1.log.info(LOG_PREFIX, `Output size ${size} bytes`.yellow, (0, pretty_bytes_1.default)(size).bgMagenta.white);
67
- console.log('');
68
68
  };
69
69
  }
70
70
  initWebpack(cfg) {
@@ -119,12 +119,12 @@ class Builder {
119
119
  }
120
120
  parentDoneHook() {
121
121
  this.parentCompiler.hooks.done.tap('tuya-scripts', (stats) => {
122
- this.print([stats]);
122
+ this.print(LOG_PREFIX, [stats]);
123
123
  });
124
124
  }
125
125
  rjsDoneHook() {
126
126
  this.compiler.hooks.done.tap('rjs-builder-done', (stats) => {
127
- this.print([stats]);
127
+ this.print(LOG_PREFIX_RJS, [stats]);
128
128
  });
129
129
  }
130
130
  createWebpackHook() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/builder-mp",
3
- "version": "0.6.22-beta-2",
3
+ "version": "0.6.25",
4
4
  "description": "Ray builder for mini program",
5
5
  "keywords": [
6
6
  "ray"
@@ -28,9 +28,9 @@
28
28
  "@ray-core/build-store": "^0.0.x",
29
29
  "@ray-core/cli": "^0.0.x",
30
30
  "@ray-core/ray": "^0.0.x",
31
- "@ray-js/adapter": "^0.6.22-beta-2",
32
- "@ray-js/shared": "^0.6.22-beta-2",
33
- "@ray-js/types": "^0.6.22-beta-2",
31
+ "@ray-js/adapter": "^0.6.25",
32
+ "@ray-js/shared": "^0.6.25",
33
+ "@ray-js/types": "^0.6.25",
34
34
  "babel-loader": "^8.2.3",
35
35
  "babel-plugin-minify-dead-code-elimination": "^0.5.1",
36
36
  "babel-plugin-transform-prune-unused-imports": "^1.0.1",
@@ -61,6 +61,6 @@
61
61
  "email": "tuyafe@tuya.com"
62
62
  }
63
63
  ],
64
- "gitHead": "5d621bf1561047175b967cdf3aa35446f7d7198a",
64
+ "gitHead": "410b4714bc5f496978ddd642ee092f0fe3d8bf8d",
65
65
  "repository": {}
66
66
  }