Skip to content

Commit 29a659d

Browse files
authored
Migrate vite (#6)
* Migrate vite * Add lcov in vite test * Add more test
1 parent 1203b24 commit 29a659d

17 files changed

+4430
-3600
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,31 @@ name: CI
22
on: [push]
33
jobs:
44
build:
5-
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
5+
name: Build, lint, and test on Node ${{ matrix.node }}
66

7-
runs-on: ${{ matrix.os }}
7+
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node: ['16.x', '18.x']
10+
node: ['18.x', '20.x']
1111
os: [ubuntu-latest, windows-latest, macOS-latest]
1212

1313
steps:
14-
- name: Checkout repo
15-
uses: actions/checkout@v2
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Use Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: ${{ matrix.node }}
1620

1721
- name: Use Node ${{ matrix.node }}
1822
uses: actions/setup-node@v1
1923
with:
2024
node-version: ${{ matrix.node }}
2125

22-
- name: Install deps and build (with cache)
23-
uses: pnpm/[email protected]
24-
with:
25-
version: 7.11.0
26-
run_install: true
27-
28-
- name: Lint
29-
run: pnpm lint
30-
31-
- name: Test
32-
run: pnpm coverage
33-
34-
- name: Build
35-
run: pnpm build
26+
- run: npm ci
27+
- run: npm run lint
28+
- run: npm run coverage
29+
- run: npm run build
3630

3731
- name: Coveralls
3832
uses: coverallsapp/github-action@master

.github/workflows/release.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,20 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout repo
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313

14-
- name: Install deps and build (with cache)
15-
uses: pnpm/action-setup@v2.0.1
14+
- name: Use Node.js
15+
uses: actions/setup-node@v3
1616
with:
17-
version: 7.11.0
18-
run_install: true
17+
node-version: 20
18+
registry-url: https://registry.npmjs.org/
1919

20-
- name: Build
21-
run: pnpm build
20+
- run: npm ci
21+
- run: npm run build
2222

2323
- name: Prepare Pack
2424
run: cp package.json README.md dist/
2525

26-
- uses: actions/setup-node@v2
27-
with:
28-
node-version: 18
29-
registry-url: https://registry.npmjs.org/
30-
3126
- run: npm publish
3227
env:
3328
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,4 @@ psd
6565
thumb
6666
sketch
6767
Thumbs.db
68-
package-lock.json
69-
yarn.lock.json
68+
yarn.lock.json

.prettierrc

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

.vscode/settings.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
"*.md": "mdx"
77
},
88
"editor.codeActionsOnSave": {
9-
"source.fixAll.eslint": false
9+
"source.fixAll.eslint": "never"
1010
},
1111
"javascript.updateImportsOnFileMove.enabled": "never",
12-
"npm.packageManager": "pnpm",
1312
"liveServer.settings.port": 5501
14-
}
13+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Avoid writing code that contains high scope decoupling with using-try-catch.
3030
## Installation
3131

3232
```sh
33-
$ npm add using-try-catch
33+
$ npm install using-try-catch
3434

3535
// OR
3636

jest.config.js

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

0 commit comments

Comments
 (0)