create-umi 4.0.0 → 4.0.3
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/package.json +6 -6
- package/templates/app/.gitignore.tpl +0 -4
- package/templates/app/package.json.tpl +1 -0
- 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/.eslintrc.js.tpl +3 -0
- package/templates/max/.husky/commit-msg +4 -0
- package/templates/max/.husky/pre-commit +4 -0
- package/templates/max/.lintstagedrc.tpl +17 -0
- package/templates/max/.stylelintrc.js.tpl +3 -0
- package/templates/max/package.json.tpl +6 -2
- package/templates/max/src/pages/Access/index.tsx +3 -2
- package/templates/max/src/pages/Home/index.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-umi",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
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.
|
|
28
|
+
"@umijs/utils": "4.0.3"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"*.{md,json}": [
|
|
3
|
+
"prettier --write"
|
|
4
|
+
],
|
|
5
|
+
"*.{js,jsx}": [
|
|
6
|
+
"max lint --fix --eslint-only",
|
|
7
|
+
"prettier --write"
|
|
8
|
+
],
|
|
9
|
+
"*.{css,less}": [
|
|
10
|
+
"max lint --fix --stylelint-only",
|
|
11
|
+
"prettier --write"
|
|
12
|
+
],
|
|
13
|
+
"*.ts?(x)": [
|
|
14
|
+
"max lint --fix --eslint-only",
|
|
15
|
+
"prettier --parser=typescript --write"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
"scripts": {
|
|
4
4
|
"dev": "max dev",
|
|
5
5
|
"build": "max build",
|
|
6
|
+
"prepare": "husky install",
|
|
6
7
|
"postinstall": "max setup",
|
|
8
|
+
"setup": "max setup",
|
|
7
9
|
"start": "npm run dev"
|
|
8
10
|
},
|
|
9
11
|
"dependencies": {
|
|
@@ -15,9 +17,11 @@
|
|
|
15
17
|
"devDependencies": {
|
|
16
18
|
"@types/react": "^18.0.0",
|
|
17
19
|
"@types/react-dom": "^18.0.0",
|
|
18
|
-
"
|
|
20
|
+
"husky": "^8.0.1",
|
|
21
|
+
"lint-staged": "^13.0.3",
|
|
19
22
|
"prettier": "^2",
|
|
20
23
|
"prettier-plugin-organize-imports": "^2",
|
|
21
|
-
"prettier-plugin-packagejson": "^2"
|
|
24
|
+
"prettier-plugin-packagejson": "^2",
|
|
25
|
+
"typescript": "^4.1.2"
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -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;
|