Skip to content

Commit 1ce3f39

Browse files
authored
Merge pull request #44 from krutoo/refactor-and-audit
Refactor & audit
2 parents 21d1897 + 9f43d79 commit 1ce3f39

29 files changed

+2168
-11257
lines changed

.eslintrc.js

-15
This file was deleted.

.github/workflows/npm-publish.yml

+11-22
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
name: Publish Node.js package
1+
name: Publish Node.js Package
22

33
on:
44
release:
55
types: [created]
66

77
jobs:
8-
publish-npm:
8+
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v2
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
1313
with:
14-
node-version: 14
14+
node-version: 20
1515
registry-url: https://registry.npmjs.org/
16-
17-
- name: Install dependencies
18-
run: npm ci
19-
20-
- name: Lint
21-
run: |
22-
npm run lint
23-
npm run type-check
24-
25-
- name: Build package
26-
run: |
27-
npm --no-git-tag-version version ${GITHUB_REF#refs/*/}
28-
npm run build
29-
30-
- name: Publish build
31-
run: npm publish
16+
- run: npm ci
17+
- run: npm run check
18+
- run: npm run build
19+
- run: npm --no-git-tag-version version ${{ github.event.release.tag_name }}
20+
- run: npm publish --access public
3221
env:
33-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
22+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

.github/workflows/tests.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
name: Tests
1+
name: Test
22

33
on:
44
push:
5-
branches: [master]
5+
branches: ['main']
66
pull_request:
7-
branches: [master]
7+
branches: ['main']
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v2
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
1515
with:
16-
node-version: 14
16+
node-version: 20
1717
- run: npm ci
18-
- run: npm run lint
19-
- run: npm run type-check
20-
- run: npm run test --if-present
18+
- run: npm run check

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ dist
77
.parcel-cache
88
.vscode
99

10-
# npm pack default output
11-
middleware-axios-0.0.0.tgz
10+
# npm pack output
11+
*.tgz

.husky/pre-commit

100755100644
-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx lint-staged

.husky/pre-push

100755100644
+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
npm run type-check
1+
npm run check

.npmignore

-6
This file was deleted.

.prettierrc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"arrowParens": "avoid",
33
"bracketSpacing": true,
4-
"jsxBracketSameLine": false,
4+
"bracketSameLine": false,
55
"jsxSingleQuote": true,
6-
"printWidth": 100,
76
"semi": true,
87
"singleQuote": true,
98
"tabWidth": 2,
10-
"trailingComma": "all"
9+
"trailingComma": "all",
10+
"printWidth": 100
1111
}

readme.md README.md

File renamed without changes.

example/.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Local
2+
.DS_Store
3+
*.local
4+
*.log*
5+
6+
# Dist
7+
node_modules
8+
dist/
9+
10+
# IDE
11+
.vscode/*
12+
!.vscode/extensions.json
13+
.idea

example/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Rsbuild Project
2+
3+
## Setup
4+
5+
Install the dependencies:
6+
7+
```bash
8+
pnpm install
9+
```
10+
11+
## Get Started
12+
13+
Start the dev server:
14+
15+
```bash
16+
pnpm dev
17+
```
18+
19+
Build the app for production:
20+
21+
```bash
22+
pnpm build
23+
```
24+
25+
Preview the production build locally:
26+
27+
```bash
28+
pnpm preview
29+
```

0 commit comments

Comments
 (0)