Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.2.0 #11

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["@emotion"]
}
52 changes: 52 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "import"],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"import/order": [
"error",
{
"groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"], "type", "unknown", "object"],
"pathGroups": [
{
"pattern": "{react,react-dom}",
"group": "builtin",
"position": "before"
},
{
"pattern": "@**/**",
"group": "external",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["{react,react-dom}", "@**/**"],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
],
"import/no-unresolved": ["error", { "ignore": ["^url:"] }]
}
}
28 changes: 20 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,23 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
with:
node-version: "14"
path: qieyun-autoderiver
- uses: actions/checkout@v3
with:
repository: graphemecluster/qieyun-autoderiver-evaluate
path: qieyun-autoderiver-evaluate
- uses: actions/setup-node@v3
with:
node-version: 14
- run: cd ./qieyun-autoderiver-evaluate/
- run: npm ic
- run: npm run build
- run: cd ../qieyun-autoderiver/
- run: npm ic
- run: npm run lint
- run: npm run build
- name: Install coscmd
run: sudo pip install coscmd
- name: Configure coscmd
Expand All @@ -22,15 +35,14 @@ jobs:
BUCKET: ${{ secrets.Bucket }}
REGION: ${{ secrets.Region }}
run: coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION
- run: npm install
- run: npm run build
- name: Publish static files to COS
run: |
coscmd upload -rs --delete -f ./build/static/ /
rm -rf build/static
cd ./build/
coscmd upload -rs --delete -f ./ / --ignore index.html
rm -rf !(index.html)

# Rewrite links to static files
sed -i 's|"/qieyun-autoderiver/static/|"https://qieyun-autoderiver-1305783649.file.myqcloud.com/|g' build/*.*
sed -i 's|"/index|"https://qieyun-autoderiver-1305783649.file.myqcloud.com/index|g' index.html
- name: Publish to GitHub Pages
run: |
# Create a temporary directory
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
- uses: actions/checkout@v3
with:
path: qieyun-autoderiver
- uses: actions/checkout@v3
with:
repository: graphemecluster/qieyun-autoderiver-evaluate
path: qieyun-autoderiver-evaluate
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Install Node.js packages
run: npm ci
- name: Build
run: npm build
- run: cd ./qieyun-autoderiver-evaluate/
- run: npm ic
- run: npm run build
- run: cd ../qieyun-autoderiver/
- run: npm ic
- run: npm run lint
- run: npm run build
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# production
/build

# caching
/.parcel-cache

# misc
.DS_Store
.env.local
Expand Down
8 changes: 4 additions & 4 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"arrowParens": "avoid",
"printWidth": 120,
"jsxBracketSameLine": true,
"quoteProps": "consistent"
"arrowParens": "avoid",
"printWidth": 120,
"bracketSameLine": true,
"quoteProps": "consistent"
}
7 changes: 6 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"styled-components.vscode-styled-components",
"bierner.comment-tagged-templates"
]
}
15 changes: 0 additions & 15 deletions README.md

This file was deleted.

8 changes: 0 additions & 8 deletions craco.config.js

This file was deleted.

Loading