create-umi 4.0.0-rc.1 → 4.0.0-rc.12
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.
- package/dist/index.js +5 -4
- package/package.json +4 -3
- package/templates/app/{assets → src/assets}/yay.jpg +0 -0
- package/templates/app/{layouts → src/layouts}/index.less +0 -0
- package/templates/app/{layouts → src/layouts}/index.tsx.tpl +0 -0
- package/templates/app/{pages → src/pages}/docs.tsx +0 -0
- package/templates/app/{pages → src/pages}/index.tsx +2 -1
- package/templates/app/typings.d.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const testData = {
|
|
|
22
22
|
registry: 'https://registry.npmjs.org/',
|
|
23
23
|
};
|
|
24
24
|
exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
-
const [
|
|
25
|
+
const [name] = args._;
|
|
26
26
|
let npmClient = 'pnpm';
|
|
27
27
|
let registry = 'https://registry.npmjs.org/';
|
|
28
28
|
// test ignore prompts
|
|
@@ -44,7 +44,7 @@ exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function
|
|
|
44
44
|
{
|
|
45
45
|
type: 'select',
|
|
46
46
|
name: 'registry',
|
|
47
|
-
message: 'Pick
|
|
47
|
+
message: 'Pick Npm Registry',
|
|
48
48
|
choices: [
|
|
49
49
|
{
|
|
50
50
|
title: 'npm',
|
|
@@ -86,9 +86,10 @@ exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function
|
|
|
86
86
|
message: `Which organization is your plugin stored under github?`,
|
|
87
87
|
},
|
|
88
88
|
];
|
|
89
|
+
const target = name ? (0, path_1.join)(cwd, name) : cwd;
|
|
89
90
|
const generator = new utils_1.BaseGenerator({
|
|
90
91
|
path: (0, path_1.join)(__dirname, '..', 'templates', args.plugin ? 'plugin' : 'app'),
|
|
91
|
-
target
|
|
92
|
+
target,
|
|
92
93
|
data: args.default
|
|
93
94
|
? testData
|
|
94
95
|
: {
|
|
@@ -101,6 +102,6 @@ exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function
|
|
|
101
102
|
yield generator.run();
|
|
102
103
|
if (!args.default) {
|
|
103
104
|
// install
|
|
104
|
-
(0, utils_1.installWithNpmClient)({ npmClient });
|
|
105
|
+
(0, utils_1.installWithNpmClient)({ npmClient, cwd: target });
|
|
105
106
|
}
|
|
106
107
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-umi",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.12",
|
|
4
4
|
"description": "create-umi",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/create-umi#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "pnpm tsc",
|
|
23
23
|
"build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
|
|
24
|
-
"dev": "pnpm build -- --watch"
|
|
24
|
+
"dev": "pnpm build -- --watch",
|
|
25
|
+
"test": "jest -c ../../jest.turbo.config.ts"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@umijs/utils": "4.0.0-rc.
|
|
28
|
+
"@umijs/utils": "4.0.0-rc.12"
|
|
28
29
|
},
|
|
29
30
|
"publishConfig": {
|
|
30
31
|
"access": "public"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import yayJpg from '../assets/yay.jpg';
|
|
2
3
|
|
|
3
4
|
export default function HomePage() {
|
|
4
5
|
return (
|
|
5
6
|
<div>
|
|
6
7
|
<h2>Yay! Welcome to umi!</h2>
|
|
7
8
|
<p>
|
|
8
|
-
<img src={
|
|
9
|
+
<img src={yayJpg} width="388" />
|
|
9
10
|
</p>
|
|
10
11
|
<p>
|
|
11
12
|
To get started, edit <code>pages/index.tsx</code> and save to reload.
|