@tuya-sat/micro-dev-loader 2.3.0-rc.1 → 3.0.0-beta.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.
|
@@ -26,18 +26,18 @@ class LocalsPlugin {
|
|
|
26
26
|
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,
|
|
27
27
|
}, (assets, callback) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
const filenames = yield fs__default["default"].readdirSync(this.localesOriginPath);
|
|
29
|
-
fs__default["default"].
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
fs__default["default"].existsSync(this.localesTargetPath) &&
|
|
30
|
+
fs__default["default"].rmdirSync(path.resolve(this.localesTargetPath), {
|
|
31
|
+
recursive: true,
|
|
32
|
+
});
|
|
32
33
|
fs__default["default"].mkdirSync(path.resolve(this.localesTargetPath));
|
|
33
34
|
const jiti = require("jiti")(path.resolve(this.localesOriginPath));
|
|
34
35
|
filenames.forEach((v) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
35
36
|
var _a;
|
|
36
|
-
if (v === "index
|
|
37
|
+
if (v.substring(0, 5) === "index")
|
|
37
38
|
return;
|
|
38
39
|
const lang = v.split(".")[0];
|
|
39
40
|
const content = jiti(`./${v}`);
|
|
40
|
-
console.log("yongsi content", content);
|
|
41
41
|
const resObj = {};
|
|
42
42
|
const recursive = (value, prefix, key) => {
|
|
43
43
|
if (typeof value === "object") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/micro-dev-loader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
"@babel/generator": "7.17.7",
|
|
15
15
|
"@babel/plugin-syntax-typescript": "7.16.7",
|
|
16
16
|
"@babel/template": "7.16.7",
|
|
17
|
-
"@tuya-sat/micro-utils": "
|
|
17
|
+
"@tuya-sat/micro-utils": "3.0.0-beta.2",
|
|
18
18
|
"cheerio": "1.0.0-rc.10",
|
|
19
19
|
"ejs": "3.1.6",
|
|
20
20
|
"fs-extra": "10.0.1",
|
|
21
21
|
"html-webpack-plugin": "5.5.0",
|
|
22
|
-
"jiti": "1.14.0",
|
|
23
22
|
"less": "4.1.2",
|
|
24
23
|
"less-bundle-promise": "1.0.11",
|
|
25
24
|
"loader-utils": "3.2.0",
|
|
@@ -49,6 +48,5 @@
|
|
|
49
48
|
"saas",
|
|
50
49
|
"cloud",
|
|
51
50
|
"tuya"
|
|
52
|
-
]
|
|
53
|
-
"stableVersion": "2.2.30"
|
|
51
|
+
]
|
|
54
52
|
}
|