搭建项目

master_basic
鲁誉程 1 year ago
commit 898e1769bb

9
.gitignore vendored

@ -0,0 +1,9 @@
/node_modules
/.env.local
/.umirc.local.ts
/config/config.local.ts
/src/.umi
/src/.umi-production
/src/.umi-test
/dist
.swc

@ -0,0 +1,2 @@
registry=https://registry.npmmirror.com/

@ -0,0 +1,7 @@
import { defineConfig } from "umi";
import routes from './config/routes/index'
export default defineConfig({
routes,
npmClient: 'yarn',
});

@ -0,0 +1,5 @@
const routes = [
{path: '/', component: '@/pages/index'}
]
export default routes;

@ -0,0 +1,19 @@
{
"private": true,
"author": "鲁誉程 <2659568239@qq.com>",
"scripts": {
"dev": "umi dev",
"build": "umi build",
"postinstall": "umi setup",
"setup": "umi setup",
"start": "npm run dev"
},
"dependencies": {
"umi": "^4.0.88"
},
"devDependencies": {
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"typescript": "^5.0.3"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

@ -0,0 +1,9 @@
import styles from './index.less';
export default function Layout() {
return (
<div>
</div>
);
}

@ -0,0 +1,15 @@
import yayJpg from '../assets/yay.jpg';
export default function HomePage() {
return (
<div>
<h2>Yay! Welcome to umi!</h2>
<p>
<img src={yayJpg} width="388" />
</p>
<p>
To get started, edit <code>pages/index.tsx</code> and save to reload.
</p>
</div>
);
}

@ -0,0 +1,3 @@
{
"extends": "./src/.umi/tsconfig.json"
}

1
typings.d.ts vendored

@ -0,0 +1 @@
import 'umi/typings';

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save