init
This commit is contained in:
39
.gitignore
vendored
39
.gitignore
vendored
@@ -1,29 +1,10 @@
|
||||
# ---> Dart
|
||||
# See https://www.dartlang.org/guides/libraries/private-files
|
||||
|
||||
# Files and directories created by pub
|
||||
.dart_tool/
|
||||
.packages
|
||||
build/
|
||||
# If you're building an application, you may want to check-in your pubspec.lock
|
||||
pubspec.lock
|
||||
|
||||
# Directory created by dartdoc
|
||||
# If you don't generate documentation locally you can remove this line.
|
||||
doc/api/
|
||||
|
||||
# dotenv environment variables file
|
||||
.env*
|
||||
|
||||
# Avoid committing generated Javascript files:
|
||||
*.dart.js
|
||||
*.info.json # Produced by the --dump-info flag.
|
||||
*.js # When generated by dart2js. Don't specify *.js if your
|
||||
# project includes source files written in JavaScript.
|
||||
*.js_
|
||||
*.js.deps
|
||||
*.js.map
|
||||
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
|
||||
/node_modules
|
||||
/.env.local
|
||||
/.umirc.local.ts
|
||||
/config/config.local.ts
|
||||
/src/.umi
|
||||
/src/.umi-production
|
||||
/src/.umi-test
|
||||
/dist
|
||||
.swc
|
||||
yarn.local
|
||||
9
config/config.js
Normal file
9
config/config.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import { defineConfig } from "umi";
|
||||
|
||||
export default defineConfig({
|
||||
routes: [
|
||||
{ path: "/", component: "index" },
|
||||
{ path: "/docs", component: "docs" },
|
||||
],
|
||||
npmClient: 'yarn',
|
||||
});
|
||||
3
jsconfig.json
Normal file
3
jsconfig.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "./src/.umi/tsconfig.json"
|
||||
}
|
||||
0
mock/app.jsx
Normal file
0
mock/app.jsx
Normal file
19
package.json
Normal file
19
package.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"private": true,
|
||||
"author": "liuhanhua <1>",
|
||||
"scripts": {
|
||||
"dev": "umi dev",
|
||||
"build": "umi build",
|
||||
"postinstall": "umi setup",
|
||||
"setup": "umi setup",
|
||||
"start": "npm run dev"
|
||||
},
|
||||
"dependencies": {
|
||||
"umi": "^4.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.0.33",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"typescript": "^5.0.3"
|
||||
}
|
||||
}
|
||||
0
src/app.jsx
Normal file
0
src/app.jsx
Normal file
BIN
src/assets/yay.jpg
Normal file
BIN
src/assets/yay.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 177 KiB |
0
src/global.js
Normal file
0
src/global.js
Normal file
0
src/global.less
Normal file
0
src/global.less
Normal file
21
src/layouts/index.jsx
Normal file
21
src/layouts/index.jsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Link, Outlet } from 'umi';
|
||||
import styles from './index.less';
|
||||
|
||||
export default function Layout() {
|
||||
return (
|
||||
<div className={styles.navs}>
|
||||
<ul>
|
||||
<li>
|
||||
<Link to="/">Home</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link to="/docs">Docs</Link>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/umijs/umi">Github</a>
|
||||
</li>
|
||||
</ul>
|
||||
<Outlet />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
10
src/layouts/index.less
Normal file
10
src/layouts/index.less
Normal file
@@ -0,0 +1,10 @@
|
||||
.navs {
|
||||
ul {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
}
|
||||
li {
|
||||
margin-right: 1em;
|
||||
}
|
||||
}
|
||||
0
src/loading.jsx
Normal file
0
src/loading.jsx
Normal file
0
src/models/global.js
Normal file
0
src/models/global.js
Normal file
0
src/models/index.js
Normal file
0
src/models/index.js
Normal file
0
src/overrides.less
Normal file
0
src/overrides.less
Normal file
9
src/pages/docs.jsx
Normal file
9
src/pages/docs.jsx
Normal file
@@ -0,0 +1,9 @@
|
||||
const DocsPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<p>This is umi docs.</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DocsPage;
|
||||
15
src/pages/index.jsx
Normal file
15
src/pages/index.jsx
Normal file
@@ -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>
|
||||
);
|
||||
}
|
||||
1
typings.d.ts
vendored
Normal file
1
typings.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import 'umi/typings';
|
||||
Reference in New Issue
Block a user