Skip to content

Commit 211d530

Browse files
authored
[refactor] upgrade WebCell & other packages to Modern versions (#3)
1 parent a9f7cd7 commit 211d530

28 files changed

+4007
-388
lines changed

.babelrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.eslintrc.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@
1111
"jsx": true
1212
}
1313
},
14-
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
14+
"plugins": ["@typescript-eslint"],
15+
"extends": [
16+
"eslint:recommended",
17+
"plugin:@typescript-eslint/recommended",
18+
"prettier"
19+
],
1520
"rules": {
16-
"no-unused-vars": "warn"
21+
"prefer-const": "warn",
22+
"no-unused-vars": "warn",
23+
"@typescript-eslint/no-unused-vars": "warn",
24+
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
25+
"@typescript-eslint/explicit-module-boundary-types": "off"
1726
}
1827
}

.github/workflows/main.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,40 @@ on:
55
- master
66
jobs:
77
Build-and-Deploy:
8+
env:
9+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
10+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
11+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
812
runs-on: ubuntu-latest
913
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v2
12-
- name: Use Node.js
13-
uses: actions/setup-node@v2-beta
14+
- uses: actions/checkout@v3
15+
16+
- uses: pnpm/action-setup@v2
1417
with:
15-
node-version: '14'
16-
- name: Install & build
18+
version: 8
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
cache: pnpm
23+
- name: Install & Build
1724
run: |
18-
npm install
19-
npm run build
20-
- name: Deploy
25+
pnpm i --frozen-lockfile
26+
pnpm build
27+
28+
- name: Deploy to GitHub pages
2129
uses: peaceiris/actions-gh-pages@v3
2230
with:
23-
publish_dir: ./docs
31+
publish_dir: ./dist
2432
personal_token: ${{ secrets.GITHUB_TOKEN }}
2533
force_orphan: true
34+
35+
- name: Deploy to Vercel
36+
uses: amondnet/vercel-action@v25
37+
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
38+
with:
39+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
42+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
43+
working-directory: ./dist
44+
vercel-args: --prod

.github/workflows/push.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Commit preview
2+
on:
3+
push:
4+
branches-ignore:
5+
- master
6+
jobs:
7+
Build-and-Deploy:
8+
env:
9+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
10+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
11+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- uses: pnpm/action-setup@v2
17+
with:
18+
version: 8
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: 18
22+
cache: pnpm
23+
- name: Install & Build
24+
run: |
25+
pnpm i --frozen-lockfile
26+
pnpm build
27+
28+
- uses: amondnet/vercel-action@v25
29+
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
30+
with:
31+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
34+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
35+
working-directory: ./dist

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ yarn.lock
1919

2020
# Bundle
2121
dist/
22-
.cache/
22+
.parcel-cache/
2323
docs/
2424

2525
# IDE

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm test

.husky/pre-push

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm run build

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
auto-install-peers = false

.parcelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "@parcel/config-default",
3+
"transformers": {
4+
"*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
5+
}
6+
}

.postcssrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)