@rahul-choudhury/react-extras
v0.5.2
Published
Set up deployment, linting, and editor configuration for React apps
Maintainers
Readme
react-extras
A CLI tool that automates the setup of deployment, linting, and editor configuration for React applications.
Installation
npm install -g @rahul-choudhury/react-extrasOr run directly with npx:
npx @rahul-choudhury/react-extrasUsage
Navigate to your React project directory and run:
react-extrasThe CLI will:
- Detect your package manager, framework, and linting tools
- Show a list of files that will be created
- Prompt for confirmation before overwriting existing files
- Generate configuration files
- Install required dependencies (husky, lint-staged)
Generated Files
| File | Description |
|------|-------------|
| .github/workflows/deploy.yml | GitHub Actions CI/CD workflow |
| Dockerfile | Multi-stage Docker build configuration |
| .husky/pre-commit | Pre-commit hook for linting |
| .vscode/extensions.json | Recommended VS Code extensions |
| .editorconfig | Editor configuration for consistent formatting |
| lib/api-client.ts | Type-safe API client (placed in src/lib if src directory exists) |
| nginx.conf | Nginx configuration (Vite projects only) |
The CLI also updates your package.json with:
preparescript for Husky initializationtypecheckscript for TypeScript compilationcheckscript for running lint and format checks (Next.js only)lint-stagedconfiguration
Requirements
- Node.js >= 18
- An existing React project with
package.json
Supported Frameworks
- Next.js (automatically configures standalone output)
- Vite + TanStack Router
