Generate TypeScript projects with a clean structure in seconds
|
|
|
|
# Install globally
npm install -g ht-create-tsapp
# Or use directly with npx
npx ht-create-tsapp
Simply run the command and follow the interactive prompts:
ht-create-tsapp
🔍 Interactive prompts guide
The CLI will guide you through the setup process:
- Project name - Name for your TypeScript project
- Utils directory - Whether to include utility functions
- Lib directory - Whether to include library modules
- Package manager - Choose from npm, yarn, pnpm, or bun
Your generated project will have the following structure:
your-project-name/
├── dist/ # Compiled JavaScript files
├── scripts/ # Script files
├── lib/ # (Optional) Library modules
├── utils/ # (Optional) Utility functions
├── main.ts # Entry point
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── prettier.config.mjs # Prettier configuration
└── .gitignore # Git ignore rules
Your generated project includes these npm scripts:
Script | Description |
---|---|
dev |
Runs TypeScript compiler in watch mode |
build |
Compiles TypeScript to JavaScript |
format |
Formats code with Prettier |
start |
Builds and runs the compiled application |
Note: The script commands will automatically use your selected package manager.
# Navigate to your project directory
cd your-project-name
# Start development (with your chosen package manager)
npm run dev # or yarn dev, pnpm dev, bun dev
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -am 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Harsh Thakur
Built with ❤️ for TypeScript developers