-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from jokester/move-to-vite-build
Move to vite build
- Loading branch information
Showing
38 changed files
with
10,666 additions
and
13,962 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 这是生产环境的配置文件,如果需要本地测试,请复制此文件重命名为 | ||
# .env.local 或 .env.development.local | ||
|
||
REACT_APP_BASE_URL=/api/ | ||
REACT_APP_BASE_URL=/api/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const tsRules = { | ||
'@typescript-eslint/ban-ts-comment': 1, | ||
'@typescript-eslint/camelcase': 0, | ||
'@typescript-eslint/explicit-member-accessibility': 0, | ||
'@typescript-eslint/no-empty-function': 0, | ||
'@typescript-eslint/no-empty-interface': 0, | ||
'@typescript-eslint/no-explicit-any': 1, | ||
'@typescript-eslint/no-namespace': 0, | ||
'@typescript-eslint/no-non-null-assertion': 1, | ||
'@typescript-eslint/no-parameter-properties': 0, | ||
'@typescript-eslint/no-unused-vars': 1, | ||
'@typescript-eslint/no-var-requires': 1, | ||
}; | ||
|
||
const nodeRules = { | ||
'node/no-extraneous-import': 0, | ||
'node/no-extraneous-require': 0, | ||
'node/no-unpublished-require': 0, | ||
}; | ||
|
||
const jsRules = { | ||
'no-constant-condition': 'warn', | ||
'no-control-regex': 'warn', | ||
'no-empty': 0, | ||
'no-inner-declarations': 'warn', | ||
'no-irregular-whitespace': 'warn', | ||
'no-unused-vars': 0, | ||
'no-useless-escape': 'warn', | ||
}; | ||
|
||
const mergedRules = { | ||
...jsRules, | ||
...nodeRules, | ||
...tsRules, | ||
}; | ||
module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
}, | ||
|
||
extends: [], | ||
plugins: [], | ||
overrides: [ | ||
{ | ||
files: ['**/*.spec.ts', '**/*.test.ts', '**/*.spec.tsx', '**/*.test.tsx'], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended'], | ||
rules: mergedRules, | ||
}, | ||
], | ||
rules: mergedRules, | ||
settings: { | ||
react: { | ||
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const base = require('./.eslintrc.base'); | ||
const reactRules = { | ||
'react-hooks/exhaustive-deps': 'error', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react/button-has-type': 'error', | ||
'react/display-name': 0, | ||
'react/prop-types': 0, | ||
'react/react-in-jsx-scope': 0, | ||
}; | ||
|
||
module.exports = { | ||
...base, | ||
plugins: [...base.plugins, 'react', 'react-hooks'], | ||
rules: { | ||
...base.rules, | ||
...reactRules, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,12 @@ jobs: | |
- name: Setup node and deps | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
cache-dependency-path: 'yarn.lock' | ||
node-version: "20" | ||
|
||
- run: npm i | ||
|
||
- name: Build app | ||
run: yarn && CI=false yarn build | ||
run: npm run build | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/[email protected] | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"singleQuote": true | ||
} | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh-CN"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="/static/favicon.png" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no, viewport-fit=cover"/> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta name="description" content="MoeFlow" /> | ||
<link rel="apple-touch-icon" href="/static/logo192.png" /> | ||
<link rel="manifest" href="/static/manifest.json" /> | ||
<title>MoeFlow</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="./src/index.tsx" ></script> | ||
</body> | ||
</html> |
Oops, something went wrong.