Skip to content

Commit

Permalink
Merge pull request #44 from krutoo/refactor-and-audit
Browse files Browse the repository at this point in the history
Refactor & audit
  • Loading branch information
krutoo authored Aug 15, 2024
2 parents 21d1897 + 9f43d79 commit 1ce3f39
Show file tree
Hide file tree
Showing 29 changed files with 2,168 additions and 11,257 deletions.
15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

33 changes: 11 additions & 22 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
name: Publish Node.js package
name: Publish Node.js Package

on:
release:
types: [created]

jobs:
publish-npm:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm ci

- name: Lint
run: |
npm run lint
npm run type-check
- name: Build package
run: |
npm --no-git-tag-version version ${GITHUB_REF#refs/*/}
npm run build
- name: Publish build
run: npm publish
- run: npm ci
- run: npm run check
- run: npm run build
- run: npm --no-git-tag-version version ${{ github.event.release.tag_name }}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
16 changes: 7 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: Tests
name: Test

on:
push:
branches: [master]
branches: ['main']
pull_request:
branches: [master]
branches: ['main']

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
- run: npm ci
- run: npm run lint
- run: npm run type-check
- run: npm run test --if-present
- run: npm run check
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ dist
.parcel-cache
.vscode

# npm pack default output
middleware-axios-0.0.0.tgz
# npm pack output
*.tgz
3 changes: 0 additions & 3 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
5 changes: 1 addition & 4 deletions .husky/pre-push
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run type-check
npm run check
6 changes: 0 additions & 6 deletions .npmignore

This file was deleted.

6 changes: 3 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"bracketSameLine": false,
"jsxSingleQuote": true,
"printWidth": 100,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all"
"trailingComma": "all",
"printWidth": 100
}
File renamed without changes.
13 changes: 13 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Local
.DS_Store
*.local
*.log*

# Dist
node_modules
dist/

# IDE
.vscode/*
!.vscode/extensions.json
.idea
29 changes: 29 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Rsbuild Project

## Setup

Install the dependencies:

```bash
pnpm install
```

## Get Started

Start the dev server:

```bash
pnpm dev
```

Build the app for production:

```bash
pnpm build
```

Preview the production build locally:

```bash
pnpm preview
```
Loading

0 comments on commit 1ce3f39

Please sign in to comment.