@tuya-sat/micro-script 2.3.2 → 2.3.3
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.
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const path_1 = __importDefault(require("path"));
|
|
15
16
|
//@ts-ignore
|
|
16
17
|
const copy_webpack_plugin_1 = __importDefault(require("copy-webpack-plugin"));
|
|
17
18
|
//@ts-ignore
|
|
@@ -149,7 +150,8 @@ function getCommonConfig({ isDev, isBuild, }) {
|
|
|
149
150
|
patterns: [
|
|
150
151
|
{
|
|
151
152
|
from: paths_1.default.publicDir,
|
|
152
|
-
|
|
153
|
+
// 使用path.resolve纠正resourcePath,因为这个resourcePath值在windows平台显示的是POSIX值;
|
|
154
|
+
filter: (resourcePath) => __awaiter(this, void 0, void 0, function* () { return path_1.default.resolve(resourcePath) !== paths_1.default.spaHtml; }),
|
|
153
155
|
noErrorOnMissing: true,
|
|
154
156
|
},
|
|
155
157
|
],
|
package/dist/scripts/build.js
CHANGED
|
@@ -30,11 +30,16 @@ const config = (0, webpack_config_1.default)();
|
|
|
30
30
|
console.log(warnings.map((item) => item.message).join("\n"));
|
|
31
31
|
}
|
|
32
32
|
console.log(chalk_1.default.yellow(`当前打包工具:webpack@${version}`));
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
if (assets) {
|
|
34
|
+
console.log(chalk_1.default.blue("资源清单:"));
|
|
35
|
+
const assetsInfo = assets.map(({ size, name }) => {
|
|
36
|
+
return ` ${name} ${chalk_1.default.white(size > 1024 ? `~${Math.floor(size / 1024)}KB` : `${size}B`)}`;
|
|
37
|
+
});
|
|
38
|
+
assetsInfo.map((item) => {
|
|
39
|
+
console.log(chalk_1.default.blue(item));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
console.log(chalk_1.default.blue("无资源清单"));
|
|
44
|
+
}
|
|
40
45
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/micro-script",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"bin": "./dist/bin/cli.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@babel/preset-react": "7.16.7",
|
|
21
21
|
"@babel/preset-typescript": "7.16.7",
|
|
22
22
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
|
|
23
|
-
"@tuya-sat/micro-dev-loader": "2.3.
|
|
24
|
-
"@tuya-sat/micro-dev-proxy": "2.3.
|
|
25
|
-
"@tuya-sat/micro-utils": "2.3.
|
|
23
|
+
"@tuya-sat/micro-dev-loader": "2.3.3",
|
|
24
|
+
"@tuya-sat/micro-dev-proxy": "2.3.3",
|
|
25
|
+
"@tuya-sat/micro-utils": "2.3.3",
|
|
26
26
|
"babel-loader": "8.2.4",
|
|
27
27
|
"babel-plugin-import": "1.13.3",
|
|
28
28
|
"chalk": "4.1.2",
|