create-umi 4.0.0-canary.20220620.1 → 4.0.0-canary.20220628.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 +3 -2
- package/package.json +6 -6
- package/templates/app/package.json.tpl +2 -1
- package/templates/app/src/layouts/index.tsx.tpl +0 -1
- package/templates/app/src/pages/docs.tsx +3 -3
- package/templates/app/src/pages/index.tsx +0 -1
- package/templates/max/package.json.tpl +2 -1
- package/templates/max/src/pages/Access/index.tsx +3 -2
- package/templates/max/src/pages/Home/index.tsx +3 -2
- package/templates/vue-app/package.json.tpl +2 -2
package/dist/index.js
CHANGED
|
@@ -26,8 +26,8 @@ exports.default = async ({ cwd, args, }) => {
|
|
|
26
26
|
message: 'Pick Umi App Template',
|
|
27
27
|
choices: [
|
|
28
28
|
{ title: 'Simple App', value: 'app' },
|
|
29
|
+
{ title: 'Ant Design Pro', value: 'max' },
|
|
29
30
|
{ title: 'Vue Simple App', value: 'vue-app' },
|
|
30
|
-
{ title: 'Enterprise App', value: 'max' },
|
|
31
31
|
],
|
|
32
32
|
initial: 0,
|
|
33
33
|
},
|
|
@@ -96,13 +96,14 @@ exports.default = async ({ cwd, args, }) => {
|
|
|
96
96
|
];
|
|
97
97
|
const target = name ? (0, path_1.join)(cwd, name) : cwd;
|
|
98
98
|
const templateName = args.plugin ? 'plugin' : appTemplate;
|
|
99
|
+
const version = require('../package').version;
|
|
99
100
|
const generator = new utils_1.BaseGenerator({
|
|
100
101
|
path: (0, path_1.join)(__dirname, '..', 'templates', templateName),
|
|
101
102
|
target,
|
|
102
103
|
data: args.default
|
|
103
104
|
? testData
|
|
104
105
|
: {
|
|
105
|
-
version:
|
|
106
|
+
version: version.includes('-canary.') ? version : `^${version}`,
|
|
106
107
|
npmClient,
|
|
107
108
|
registry,
|
|
108
109
|
},
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-umi",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.20220628.2",
|
|
4
4
|
"description": "create-umi",
|
|
5
|
-
"homepage": "https://github.com/umijs/umi
|
|
6
|
-
"bugs": "https://github.com/umijs/umi
|
|
5
|
+
"homepage": "https://github.com/umijs/umi/tree/master/packages/create-umi#readme",
|
|
6
|
+
"bugs": "https://github.com/umijs/umi/issues",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/umijs/umi
|
|
9
|
+
"url": "https://github.com/umijs/umi"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"main": "dist/index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "pnpm tsc",
|
|
23
23
|
"build:deps": "umi-scripts bundleDeps",
|
|
24
|
-
"dev": "pnpm build --
|
|
24
|
+
"dev": "pnpm build --watch",
|
|
25
25
|
"test": "umi-scripts jest-turbo"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@umijs/utils": "4.0.0-canary.
|
|
28
|
+
"@umijs/utils": "4.0.0-canary.20220628.2"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
"dev": "umi dev",
|
|
5
5
|
"build": "umi build",
|
|
6
6
|
"postinstall": "umi setup",
|
|
7
|
+
"setup": "umi setup",
|
|
7
8
|
"start": "npm run dev"
|
|
8
9
|
},
|
|
9
10
|
"dependencies": {
|
|
10
|
-
"umi": "
|
|
11
|
+
"umi": "{{{ version }}}"
|
|
11
12
|
},
|
|
12
13
|
"devDependencies": {
|
|
13
14
|
"@types/react": "^18.0.0",
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
"dev": "max dev",
|
|
5
5
|
"build": "max build",
|
|
6
6
|
"postinstall": "max setup",
|
|
7
|
+
"setup": "max setup",
|
|
7
8
|
"start": "npm run dev"
|
|
8
9
|
},
|
|
9
10
|
"dependencies": {
|
|
10
11
|
"@ant-design/icons": "^4.7.0",
|
|
11
12
|
"@ant-design/pro-components": "^1.1.3",
|
|
12
|
-
"@umijs/max": "
|
|
13
|
+
"@umijs/max": "{{{ version }}}",
|
|
13
14
|
"antd": "^4.20.7"
|
|
14
15
|
},
|
|
15
16
|
"devDependencies": {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { PageContainer } from '@ant-design/pro-components';
|
|
2
2
|
import { Access, useAccess } from '@umijs/max';
|
|
3
3
|
import { Button } from 'antd';
|
|
4
|
-
import React from 'react';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
const AccessPage: React.FC = () => {
|
|
7
6
|
const access = useAccess();
|
|
8
7
|
return (
|
|
9
8
|
<PageContainer
|
|
@@ -18,3 +17,5 @@ export default () => {
|
|
|
18
17
|
</PageContainer>
|
|
19
18
|
);
|
|
20
19
|
};
|
|
20
|
+
|
|
21
|
+
export default AccessPage;
|
|
@@ -2,10 +2,9 @@ import Guide from '@/components/Guide';
|
|
|
2
2
|
import { trim } from '@/utils/format';
|
|
3
3
|
import { PageContainer } from '@ant-design/pro-components';
|
|
4
4
|
import { useModel } from '@umijs/max';
|
|
5
|
-
import React from 'react';
|
|
6
5
|
import styles from './index.less';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
const HomePage: React.FC = () => {
|
|
9
8
|
const { name } = useModel('global');
|
|
10
9
|
return (
|
|
11
10
|
<PageContainer ghost>
|
|
@@ -15,3 +14,5 @@ export default () => {
|
|
|
15
14
|
</PageContainer>
|
|
16
15
|
);
|
|
17
16
|
};
|
|
17
|
+
|
|
18
|
+
export default HomePage;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"vue": "^3.2.36",
|
|
11
|
-
"umi": "
|
|
11
|
+
"umi": "{{{ version }}}"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"typescript": "^4.1.2",
|
|
15
|
-
"@umijs/preset-vue": "
|
|
15
|
+
"@umijs/preset-vue": "{{{ version }}}"
|
|
16
16
|
}
|
|
17
17
|
}
|