@dominicode/ng-create
v1.0.1
Published
CLI to generate Angular 21 projects with all modern tools
Maintainers
Readme
@dominicode/ng-create
A CLI tool to generate customized Angular 21 projects with all modern tools and best practices.
🚀 Installation
Global Installation
npm install -g @dominicode/ng-createUsing with npx (Recommended)
npx @dominicode/ng-create📋 Prerequisites
- Node.js: >= 20.0.0
- npm: >= 9.0.0 (or yarn/pnpm)
🎯 Features
- ✅ Angular 21 project generation (SPA or SSR)
- ✅ Tailwind CSS configuration
- ✅ Test runners: Vitest or Jest
- ✅ Angular Testing Library integration
- ✅ ESLint configuration
- ✅ Husky + lint-staged for Git hooks
- ✅ AI editor configuration (Cursor/VSCode)
📝 Usage
Run the CLI and answer the interactive questions:
create-dominicode-ngThe CLI will ask you:
- Project name
- Project type (SPA/SSR)
- Style preprocessor (CSS/SCSS)
- Whether to include Tailwind CSS
- Test runner (Vitest/Jest/None)
- Whether to include Angular Testing Library
- Whether to include ESLint
- Whether to include Husky
- Whether to include AI editor configuration
Example
$ create-dominicode-ng
? Project name: my-awesome-app
? Project type: SPA
? Style preprocessor: SCSS
? Include Tailwind CSS? Yes
? Test runner: Vitest
? Include Angular Testing Library? Yes
? Include ESLint? Yes
? Include Husky? Yes
? Include AI editor configuration? Yes
Creating Angular project...
✓ Project created successfully!🏗️ Project Structure
ng-create-cli/
├── bin/
│ └── index.js # CLI entry point
├── src/
│ ├── cli.ts # Main logic and prompts
│ ├── types.ts # TypeScript types
│ ├── steps/ # Configuration steps
│ │ ├── create-angular-app.ts
│ │ ├── add-tailwind.ts
│ │ ├── add-vitest.ts
│ │ ├── add-jest.ts
│ │ ├── add-testing-library.ts
│ │ ├── add-eslint.ts
│ │ ├── add-husky.ts
│ │ └── add-ai-editor-config.ts
│ └── utils/ # Utilities
│ ├── run-command.ts
│ ├── modify-json.ts
│ └── package-manager.ts
├── package.json
├── tsconfig.json
├── vitest.config.ts
└── README.md🔧 Development
Local Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm start
# Or create a local link
npm link
create-dominicode-ngAvailable Scripts
npm run build- Compile TypeScript to JavaScriptnpm run dev- Compile in watch modenpm run test- Run tests with Vitestnpm start- Execute the compiled CLInpm run prepublishOnly- Build before publishing
🧪 Testing
Run tests with:
npm test🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
Development Guidelines
- Follow TypeScript best practices
- Write tests for new features
- Follow conventional commits format
- Ensure all tests pass before submitting
🐛 Troubleshooting
Common Issues
Issue: Command not found after installation
- Solution: Make sure npm global bin directory is in your PATH
Issue: Permission errors on macOS/Linux
- Solution: Use
sudo npm install -g @dominicode/ng-createor configure npm to use a different directory
Issue: Angular CLI version conflicts
- Solution: Ensure you have the latest Angular CLI installed globally or use npx
📚 Related Resources
📄 License
MIT License - see the LICENSE file for details.
👤 Author
Dominicode
- GitHub: @dominicode
🙏 Acknowledgments
- Angular team for the amazing framework
- All contributors and users of this tool
