Skip to content

Commit

Permalink
chore(docs): add scripts and update readme, fix linting error (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
seriouslag authored May 3, 2024
1 parent d9be9f0 commit 75090d6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,39 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(

```

## Development

### Install dependencies

```bash
pnpm install
```

### Run tests
```bash
pnpm test
```

### Run linter
```bash
pnpm lint
```

### Run linter and fix
```bash
pnpm lint:fix
```

### Update snapshots
```bash
pnpm snapshot
```

### Build example and validate generated code
```bash
npm run build && pnpm --filter @7nohe/react-app generate:api && pnpm --filter @7nohe/react-app test:generated
```

## License

MIT
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"workspaces": ["examples/*"],
"scripts": {
"build": "rimraf dist && tsc -p tsconfig.json",
"lint": "biome check .",
"lint:fix": "biome check --apply .",
"preview": "npm run build && npm -C examples/react-app run generate:api",
"prepublishOnly": "npm run build",
"release": "npx git-ensure -a && npx bumpp --commit --tag --push",
"test": "vitest --coverage.enabled true"
"test": "vitest --coverage.enabled true",
"snapshot": "vitest --update"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/createImports.mts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const createImports = ({
ts.factory.createImportSpecifier(
true,
undefined,
ts.factory.createIdentifier("QueryClient")
ts.factory.createIdentifier("QueryClient"),
),
ts.factory.createImportSpecifier(
false,
Expand Down

0 comments on commit 75090d6

Please sign in to comment.