@umijs/utils 4.0.0-rc.4 → 4.0.0-rc.7
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.
|
@@ -18,7 +18,7 @@ const fs_extra_1 = __importDefault(require("../../compiled/fs-extra"));
|
|
|
18
18
|
const Generator_1 = __importDefault(require("../Generator/Generator"));
|
|
19
19
|
class BaseGenerator extends Generator_1.default {
|
|
20
20
|
constructor({ path, target, data, questions }) {
|
|
21
|
-
super({ cwd:
|
|
21
|
+
super({ cwd: process.cwd(), args: data });
|
|
22
22
|
this.path = path;
|
|
23
23
|
this.target = target;
|
|
24
24
|
this.data = data;
|
|
@@ -38,16 +38,15 @@ class BaseGenerator extends Generator_1.default {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
const file = (0, path_1.basename)(this.path.replace(/\.tpl$/, ''));
|
|
42
41
|
if (this.path.endsWith('.tpl')) {
|
|
43
42
|
this.copyTpl({
|
|
44
43
|
templatePath: this.path,
|
|
45
|
-
target:
|
|
44
|
+
target: this.target,
|
|
46
45
|
context,
|
|
47
46
|
});
|
|
48
47
|
}
|
|
49
48
|
else {
|
|
50
|
-
const absTarget =
|
|
49
|
+
const absTarget = this.target;
|
|
51
50
|
fs_extra_1.default.mkdirpSync((0, path_1.dirname)(absTarget));
|
|
52
51
|
(0, fs_1.copyFileSync)(this.path, absTarget);
|
|
53
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/utils",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.7",
|
|
4
4
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/utils#readme",
|
|
5
5
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "pnpm tsc",
|
|
19
19
|
"build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
|
|
20
|
-
"dev": "pnpm build -- --watch"
|
|
20
|
+
"dev": "pnpm build -- --watch",
|
|
21
|
+
"test": "jest -c ../../jest.turbo.config.ts"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
24
|
"chokidar": "3.5.3"
|
|
@@ -26,14 +27,14 @@
|
|
|
26
27
|
"@types/color": "3.0.3",
|
|
27
28
|
"@types/cross-spawn": "6.0.2",
|
|
28
29
|
"@types/debug": "4.1.7",
|
|
29
|
-
"@types/lodash": "4.14.
|
|
30
|
+
"@types/lodash": "4.14.180",
|
|
30
31
|
"@types/mustache": "4.1.2",
|
|
31
32
|
"@types/prompts": "^2.0.14",
|
|
32
33
|
"@types/rimraf": "3.0.2",
|
|
33
34
|
"@types/semver": "7.3.9",
|
|
34
35
|
"address": "1.1.2",
|
|
35
|
-
"axios": "0.26.
|
|
36
|
-
"chalk": "5.0.
|
|
36
|
+
"axios": "0.26.1",
|
|
37
|
+
"chalk": "5.0.1",
|
|
37
38
|
"cheerio": "1.0.0-rc.10",
|
|
38
39
|
"color": "4.2.1",
|
|
39
40
|
"cross-spawn": "7.0.3",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"pirates": "4.0.5",
|
|
49
50
|
"pkg-up": "4.0.0",
|
|
50
51
|
"portfinder": "1.0.28",
|
|
51
|
-
"prettier": "2.
|
|
52
|
+
"prettier": "2.6.0",
|
|
52
53
|
"prompts": "2.4.2",
|
|
53
54
|
"resolve": "1.22.0",
|
|
54
55
|
"rimraf": "3.0.2",
|