commit 972da85a6386cacc05e6435d1ca89d579db445c8
Author: taoya7 <569781231@qq.com>
Date: Sun Oct 1 00:14:36 2023 +0800
feat: init
diff --git a/.editorconfig b/.editorconfig
new file mode 100755
index 0000000..7e3649a
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+# http://editorconfig.org
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[Makefile]
+indent_style = tab
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bee1cf6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,20 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/npm-debug.log*
+/yarn-error.log
+/yarn.lock
+/package-lock.json
+
+# production
+/dist
+
+# misc
+.DS_Store
+
+# umi
+/src/.umi
+/src/.umi-production
+/src/.umi-test
+/.env.local
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..b58b603
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,5 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..3634929
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/umi3-start.iml b/.idea/umi3-start.iml
new file mode 100644
index 0000000..24643cc
--- /dev/null
+++ b/.idea/umi3-start.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..0d4222f
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,8 @@
+**/*.md
+**/*.svg
+**/*.ejs
+**/*.html
+package.json
+.umi
+.umi-production
+.umi-test
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..94beb14
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,11 @@
+{
+ "singleQuote": true,
+ "trailingComma": "all",
+ "printWidth": 80,
+ "overrides": [
+ {
+ "files": ".prettierrc",
+ "options": { "parser": "json" }
+ }
+ ]
+}
diff --git a/.umirc.ts b/.umirc.ts
new file mode 100644
index 0000000..4ee6d79
--- /dev/null
+++ b/.umirc.ts
@@ -0,0 +1,14 @@
+import { defineConfig } from 'umi';
+
+export default defineConfig({
+ nodeModulesTransform: {
+ type: 'none',
+ },
+ routes: [
+ { path: '/', component: '@/pages/index' },
+ ],
+ fastRefresh: {},
+ history: {
+ type: 'hash'
+ },
+});
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..07afeb7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,15 @@
+# umi project
+
+## Getting Started
+
+Install dependencies,
+
+```bash
+$ yarn
+```
+
+Start the dev server,
+
+```bash
+$ yarn start
+```
diff --git a/bun.lockb b/bun.lockb
new file mode 100755
index 0000000..3921874
Binary files /dev/null and b/bun.lockb differ
diff --git a/mock/.gitkeep b/mock/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..cc5a99c
--- /dev/null
+++ b/package.json
@@ -0,0 +1,38 @@
+{
+ "private": true,
+ "scripts": {
+ "start": "umi dev",
+ "build": "umi build",
+ "postinstall": "umi generate tmp",
+ "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
+ "test": "umi-test",
+ "test:coverage": "umi-test --coverage"
+ },
+ "gitHooks": {
+ "pre-commit": "lint-staged"
+ },
+ "lint-staged": {
+ "*.{js,jsx,less,md,json}": [
+ "prettier --write"
+ ],
+ "*.ts?(x)": [
+ "prettier --parser=typescript --write"
+ ]
+ },
+ "dependencies": {
+ "@ant-design/pro-layout": "^6.5.0",
+ "react": "17.x",
+ "react-dom": "17.x",
+ "umi": "^3.5.41"
+ },
+ "devDependencies": {
+ "@types/react": "^17.0.0",
+ "@types/react-dom": "^17.0.0",
+ "@umijs/preset-react": "1.x",
+ "@umijs/test": "^3.5.41",
+ "lint-staged": "^10.0.7",
+ "prettier": "^2.2.0",
+ "typescript": "^4.1.2",
+ "yorkie": "^2.0.0"
+ }
+}
diff --git a/src/pages/about/index.tsx b/src/pages/about/index.tsx
new file mode 100644
index 0000000..06b0602
--- /dev/null
+++ b/src/pages/about/index.tsx
@@ -0,0 +1,7 @@
+export default function AboutPage() {
+ return (
+
+
关于
+
+ );
+}
diff --git a/src/pages/index.less b/src/pages/index.less
new file mode 100644
index 0000000..586302b
--- /dev/null
+++ b/src/pages/index.less
@@ -0,0 +1,3 @@
+.title {
+ background: rgb(121, 242, 157);
+}
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
new file mode 100644
index 0000000..ebdd169
--- /dev/null
+++ b/src/pages/index.tsx
@@ -0,0 +1,9 @@
+import styles from './index.less';
+
+export default function IndexPage() {
+ return (
+
+
Page index
+
+ );
+}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..6d42f8c
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,37 @@
+{
+ "compilerOptions": {
+ "target": "esnext",
+ "module": "esnext",
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "importHelpers": true,
+ "jsx": "react-jsx",
+ "esModuleInterop": true,
+ "sourceMap": true,
+ "baseUrl": "./",
+ "strict": true,
+ "paths": {
+ "@/*": ["src/*"],
+ "@@/*": ["src/.umi/*"]
+ },
+ "allowSyntheticDefaultImports": true
+ },
+ "include": [
+ "mock/**/*",
+ "src/**/*",
+ "config/**/*",
+ ".umirc.ts",
+ "typings.d.ts"
+ ],
+ "exclude": [
+ "node_modules",
+ "lib",
+ "es",
+ "dist",
+ "typings",
+ "**/__test__",
+ "test",
+ "docs",
+ "tests"
+ ]
+}
diff --git a/typings.d.ts b/typings.d.ts
new file mode 100644
index 0000000..06c8a5b
--- /dev/null
+++ b/typings.d.ts
@@ -0,0 +1,10 @@
+declare module '*.css';
+declare module '*.less';
+declare module '*.png';
+declare module '*.svg' {
+ export function ReactComponent(
+ props: React.SVGProps,
+ ): React.ReactElement;
+ const url: string;
+ export default url;
+}