create-umi 4.0.0-beta.16 → 4.0.0-rc.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.
- package/dist/index.js +2 -1
- package/package.json +2 -2
- package/templates/app/.gitignore.tpl +4 -2
- package/templates/app/assets/yay.jpg +0 -0
- package/templates/app/layouts/index.less +10 -0
- package/templates/app/layouts/{index.tsx → index.tsx.tpl} +4 -5
- package/templates/app/pages/{users.tsx → docs.tsx} +1 -1
- package/templates/app/pages/index.tsx +11 -1
- package/templates/app/tsconfig.json +18 -0
- package/templates/app/typings.d.ts +3 -0
- package/templates/app/pages/users/foo.tsx +0 -3
package/dist/index.js
CHANGED
|
@@ -37,8 +37,9 @@ exports.default = ({ cwd, args, }) => __awaiter(void 0, void 0, void 0, function
|
|
|
37
37
|
{ title: 'cnpm', value: 'cnpm' },
|
|
38
38
|
{ title: 'tnpm', value: 'tnpm' },
|
|
39
39
|
{ title: 'yarn', value: 'yarn' },
|
|
40
|
-
{ title: 'pnpm', value: 'pnpm'
|
|
40
|
+
{ title: 'pnpm', value: 'pnpm' },
|
|
41
41
|
],
|
|
42
|
+
initial: 4,
|
|
42
43
|
},
|
|
43
44
|
{
|
|
44
45
|
type: 'select',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-umi",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-rc.2",
|
|
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",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dev": "pnpm build -- --watch"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@umijs/utils": "4.0.0-
|
|
27
|
+
"@umijs/utils": "4.0.0-rc.2"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
Binary file
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// @ts-ignore
|
|
3
2
|
import { Link, Outlet } from 'umi';
|
|
3
|
+
import styles from './index.less';
|
|
4
4
|
|
|
5
5
|
export default function Layout() {
|
|
6
6
|
return (
|
|
7
|
-
<div>
|
|
8
|
-
<h2>global layout</h2>
|
|
7
|
+
<div className={styles.navs}>
|
|
9
8
|
<ul>
|
|
10
9
|
<li>
|
|
11
10
|
<Link to="/">Home</Link>
|
|
12
11
|
</li>
|
|
13
12
|
<li>
|
|
14
|
-
<Link to="/
|
|
13
|
+
<Link to="/docs">Docs</Link>
|
|
15
14
|
</li>
|
|
16
15
|
<li>
|
|
17
|
-
<
|
|
16
|
+
<a href="https://github.com/umijs/umi">Github</a>
|
|
18
17
|
</li>
|
|
19
18
|
</ul>
|
|
20
19
|
<Outlet />
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
export default function HomePage() {
|
|
4
|
-
return
|
|
4
|
+
return (
|
|
5
|
+
<div>
|
|
6
|
+
<h2>Yay! Welcome to umi!</h2>
|
|
7
|
+
<p>
|
|
8
|
+
<img src={require('../assets/yay.jpg')} width="388" />
|
|
9
|
+
</p>
|
|
10
|
+
<p>
|
|
11
|
+
To get started, edit <code>pages/index.tsx</code> and save to reload.
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
5
15
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"importHelpers": true,
|
|
7
|
+
"jsx": "react",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"baseUrl": ".",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": ["*"],
|
|
14
|
+
"@@/*": [".umi/*"]
|
|
15
|
+
},
|
|
16
|
+
"allowSyntheticDefaultImports": true
|
|
17
|
+
}
|
|
18
|
+
}
|