Skip to content

Commit 43dbdc9

Browse files
authored
Copy updated umijs example from vercel/vercel (#1045)
### Description Copying the update over from vercel/vercel#12868. ### Demo URL https://vercel.com/austin-merricks-projects/umijs/B7cFNqhyxAy5omTFHerXNw97bj1L ### Type of Change - [ ] New Example - [X] Example updates (Bug fixes, new features, etc.) - [ ] Other (changes to the codebase, but not to examples) ### New Example Checklist - [ ] 🛫 `npm run new-example` was used to create the example - [ ] 📚 The template wasn't used but I carefuly read the [Adding a new example](https://github.com/vercel/examples#adding-a-new-example) steps and implemented them in the example - [ ] 📱 Is it responsive? Are mobile and tablets considered?
1 parent cc41987 commit 43dbdc9

File tree

21 files changed

+68
-17260
lines changed

21 files changed

+68
-17260
lines changed

framework-boilerplates/umijs/.editorconfig

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
registry=https://registry.npmjs.com/
2+

framework-boilerplates/umijs/.prettierignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

framework-boilerplates/umijs/.prettierrc

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
1-
import { IConfig } from 'umi-types';
1+
import { defineConfig } from "umi";
22

3-
// ref: https://umijs.org/config/
4-
const config: IConfig = {
5-
treeShaking: true,
6-
plugins: [
7-
// ref: https://umijs.org/plugin/umi-plugin-react.html
8-
[
9-
'umi-plugin-react',
10-
{
11-
antd: false,
12-
dva: false,
13-
dynamicImport: false,
14-
title: 'umijs',
15-
dll: false,
16-
17-
routes: {
18-
exclude: [/components\//],
19-
},
20-
},
21-
],
3+
export default defineConfig({
4+
routes: [
5+
{ path: "/", component: "index" },
6+
{ path: "/docs", component: "docs" },
227
],
23-
};
24-
25-
export default config;
8+
npmClient: 'npm',
9+
});

framework-boilerplates/umijs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ This directory is a brief example of a [UmiJS](https://umijs.org/) app that can
88

99
Deploy your own UmiJS project with Vercel.
1010

11-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/framework-boilerplates/umijs&template=umijs)
11+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/umijs&template=umijs)
1212

1313
_Live Example: https://umijs-template.vercel.app_
1414

1515
### How We Created This Example
1616

17-
To get started with UmiJS deployed with Vercel, you can use the [Umi CLI](https://github.com/umijs/create-umi) to initialize the project:
17+
To get started with UmiJS deployed with Vercel, you can use the [Umi CLI](https://umijs.org/docs/guides/getting-started) to initialize the project:
1818

1919
```shell
20-
$ yarn create umi app-name
20+
$ npm create-umi@latest
2121
```

framework-boilerplates/umijs/mock/.gitkeep

Whitespace-only changes.
Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,18 @@
11
{
22
"private": true,
33
"scripts": {
4-
"start": "umi dev",
5-
"dev": "umi dev --port $PORT",
4+
"dev": "umi dev",
65
"build": "umi build",
7-
"test": "umi test",
8-
"lint:es": "eslint --ext .js src mock tests",
9-
"lint:ts": "tslint \"src/**/*.ts\" \"src/**/*.tsx\"",
10-
"precommit": "lint-staged"
6+
"postinstall": "umi setup",
7+
"setup": "umi setup",
8+
"start": "npm run dev"
119
},
1210
"dependencies": {
13-
"react": "^16.8.6",
14-
"react-dom": "^16.8.6"
11+
"umi": "^4.4.4"
1512
},
1613
"devDependencies": {
17-
"@types/jest": "^23.3.12",
18-
"@types/react": "^16.7.18",
19-
"@types/react-dom": "^16.0.11",
20-
"@types/react-test-renderer": "^16.0.3",
21-
"babel-eslint": "^9.0.0",
22-
"eslint": "^5.4.0",
23-
"eslint-config-umi": "^1.4.0",
24-
"eslint-plugin-flowtype": "^2.50.0",
25-
"eslint-plugin-import": "^2.14.0",
26-
"eslint-plugin-jsx-a11y": "^5.1.1",
27-
"eslint-plugin-react": "^7.11.1",
28-
"husky": "^0.14.3",
29-
"lint-staged": "^7.2.2",
30-
"react-test-renderer": "^16.7.0",
31-
"tslint": "^5.12.0",
32-
"tslint-eslint-rules": "^5.4.0",
33-
"tslint-react": "^3.6.0",
34-
"umi": "^2.7.0",
35-
"umi-plugin-react": "^1.8.0",
36-
"umi-types": "^0.2.0"
37-
},
38-
"lint-staged": {
39-
"*.{ts,tsx}": [
40-
"tslint --fix",
41-
"git add"
42-
],
43-
"*.{js,jsx}": [
44-
"eslint --fix",
45-
"git add"
46-
]
47-
},
48-
"engines": {
49-
"node": "16.x"
14+
"@types/react": "^18.0.33",
15+
"@types/react-dom": "^18.0.11",
16+
"typescript": "^5.0.3"
5017
}
5118
}

framework-boilerplates/umijs/src/global.css

Lines changed: 0 additions & 8 deletions
This file was deleted.

framework-boilerplates/umijs/src/layouts/__tests__/index.test.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)