diff --git a/README.md b/README.md index 37de013..00e1e6f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package.json b/package.json index e22c704..54cbf9e 100644 --- a/package.json +++ b/package.json @@ -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",