node-ts-scaffold
Version:
CLI tool to scaffold TypeScript projects with ESLint and Prettier
76 lines (54 loc) • 1.78 kB
Markdown
# node-ts-scaffold-cli
A CLI tool to quickly scaffold Node.js projects with TypeScript, ESLint, Prettier, and Vitest.
## Features
- Sets up a TypeScript project with modern configuration
- Integrates ESLint for code linting
- Configures Prettier for consistent code formatting
- Adds Vitest for testing
- Creates a standardized project structure
- Includes helpful npm scripts for development
## Installation
### Global Installation
```bash
npm install -g node-ts-scaffold-cli
```
### Local Usage with npx
```bash
npx node-ts-scaffold-cli
```
## Usage
```bash
node-ts-scaffold
```
Follow the interactive prompts to configure your project:
1. Project name
2. Description
3. Author
4. Whether to install dependencies automatically
## Project Structure
The scaffolded project includes:
```
your-project/
├── src/ # Source code
│ └── index.ts # Main entry point
├── test/ # Test files
│ └── index.test.ts # Sample test
├── build/ # Compiled output (generated)
├── .prettierrc # Prettier configuration
├── .gitignore # Git ignore file
├── eslint.config.js # ESLint configuration
├── tsconfig.json # TypeScript configuration
├── vitest.config.ts # Vitest configuration
└── package.json # Project dependencies and scripts
```
## Included Scripts
Your generated project includes these npm scripts:
- `npm run dev` - Run the project using tsx
- `npm test` - Run tests with Vitest and verify TypeScript and ESLint
- `npm run build` - Build the project with TypeScript
- `npm run lint` - Run ESLint
- `npm run format` - Format code with Prettier
## Requirements
- Node.js 22.x or higher
## License
MIT