create-ng-tailwind 1.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,21 +9,19 @@
9
9
 
10
10
  **🚀 Create Angular projects with Tailwind CSS in seconds**
11
11
 
12
- *Zero configuration • Modern setup • Beautiful starter templates*
13
-
14
- [Quick Start](#quick-start) • [Features](#features) • [Examples](#examples) • [Documentation](#interactive-vs-non-interactive-modes)
12
+ _Zero configuration • Modern setup • Beautiful starter templates_
15
13
 
16
14
  </div>
17
15
 
18
16
  ---
19
17
 
20
- ## Features
18
+ ## Features
21
19
 
22
- - **Angular 19** - Latest version with all modern features
23
- - 🎨 **Tailwind CSS** - Utility-first CSS framework preconfigured
24
- - 📱 **Responsive** - Mobile-first responsive design examples
20
+ - 🎯 **Angular 20+** - Latest version with standalone components and signals
21
+ - 🎨 **Tailwind CSS v4** - Utility-first CSS framework preconfigured
22
+ - 🌍 **i18n Translation** - English & Arabic with RTL support
23
+ - 🎮 **Interactive UI** - Toast notifications, Modal dialogs, and components
25
24
  - 🏗️ **Zero Configuration** - Everything set up and ready to go
26
- - 🎯 **Best Practices** - Modern project structure and configuration
27
25
  - 💨 **Fast Setup** - Get started in seconds, not minutes
28
26
 
29
27
  ## Quick Start
@@ -53,328 +51,235 @@ create-ng-tailwind [project-name] [options]
53
51
 
54
52
  ### Options
55
53
 
56
- | Option | Description | Default |
57
- |--------|-------------|---------|
58
- | `-d, --directory <dir>` | Target directory | Same as project name |
59
- | `--skip-install` | Skip npm install | false |
60
- | `--no-routing` | Disable Angular routing | **true** (routing enabled by default) |
61
- | `--style <style>` | Stylesheet format (css, scss, sass, less) | **css** (recommended for Tailwind) |
62
- | `--ssr` | Enable Server-Side Rendering | false |
63
- | `--zoneless` | Create zoneless application without zone.js | false |
64
- | `--ai-config <tools>` | AI tools to configure | **none** |
65
- | `--interactive` | Enable interactive prompts like `ng new` | false |
66
- | `-h, --help` | Display help for command | - |
67
- | `-V, --version` | Display version number | - |
54
+ | Option | Description | Default |
55
+ | --------------------------- | ------------------------------------------- | ---------------------------------- |
56
+ | `-t, --template <template>` | Template to use (minimal, starter) | **Prompted** (mandatory selection) |
57
+ | `--routing` | Enable Angular routing | true (routing enabled by default) |
58
+ | `--no-routing` | Disable Angular routing | false |
59
+ | `--ssr` | Enable Server-Side Rendering | **Prompted** (default: false) |
60
+ | `--zoneless` | Create zoneless application without zone.js | **Prompted** (default: false) |
61
+ | `--ai-config <tools>` | AI tools to configure | **Prompted** (default: none) |
62
+ | `--skip-install` | Skip npm install | false |
63
+ | `-h, --help` | Display help for command | - |
64
+ | `-V, --version` | Display version number | - |
65
+
66
+ #### Template Options:
67
+
68
+ - `minimal` - Just Angular + Tailwind (minimal setup with basic example)
69
+ - `starter` - Professional foundation with essential components, routing, services, and best practices
70
+
71
+ **Note:** If you don't provide the `--template` flag, you will be prompted to choose a template during setup.
68
72
 
69
73
  #### AI Tools Options:
70
- - `none` (default) - No AI tools
74
+
75
+ When you select AI tools during setup, Angular CLI will automatically create configuration folders and files:
76
+
77
+ - `none` (default) - No AI tools configured
71
78
  - `claude` - Configure Claude integration
72
- - `cursor` - Configure Cursor integration
79
+ - `cursor` - Configure Cursor integration
73
80
  - `gemini` - Configure Gemini integration
74
81
  - `copilot` - Configure GitHub Copilot integration
75
82
  - `jetbrains` - Configure JetBrains AI Assistant
76
83
  - `windsurf` - Configure Windsurf integration
77
84
 
85
+ **Note:** You can select multiple AI tools (checkbox selection). Each selected tool will have its configuration folder created by Angular CLI (`ng new --ai-config`). Our CLI focuses on Tailwind CSS setup and template application.
86
+
78
87
  ### Examples
79
88
 
80
- #### Quick Start (Non-Interactive)
89
+ #### Default Interactive Mode (Like `ng new`)
90
+
81
91
  ```bash
82
- # Basic usage - fast setup with BEST PRACTICE defaults
92
+ # Run the CLI - it will prompt you for all options
83
93
  npx create-ng-tailwind my-app
84
- # ✅ CSS (works best with Tailwind)
85
- # ✅ Angular Routing (most apps need it)
86
- # ✅ No SSR (simpler for most apps)
87
- # ✅ No AI tools (clean setup)
88
-
89
- # Disable routing if you don't need it
90
- npx create-ng-tailwind my-app --no-routing
91
94
 
92
- # Use SCSS if you prefer (though CSS is recommended for Tailwind)
93
- npx create-ng-tailwind my-app --style=scss
95
+ # You'll be asked:
96
+ # What is your project name? (my-angular-app)
97
+ # ✔ Which template would you like to use?
98
+ # ❯ Minimal - Just Angular + Tailwind (minimal setup)
99
+ # Starter - Professional foundation with essential components
100
+ # ✔ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? (y/N)
101
+ # ✔ Do you want to create a 'zoneless' application without zone.js? (y/N)
102
+ # ✔ Which AI tools do you want to configure? (Press <space> to select, <a> to toggle all)
103
+ # ❯◉ None
104
+ # ◯ Claude
105
+ # ◯ Cursor
106
+ # ◯ Gemini
107
+ # ◯ GitHub Copilot
108
+ # ◯ JetBrains AI
109
+ # ◯ Windsurf
94
110
  ```
95
111
 
96
- #### Interactive Mode (Like `ng new`)
112
+ #### Quick Start with CLI Flags (Skip Prompts)
113
+
97
114
  ```bash
98
- # Interactive prompts - choose options step by step
99
- npx create-ng-tailwind my-app --interactive
100
-
101
- # Interactive prompts will ask:
102
- # Which stylesheet format would you like to use? (CSS, SCSS, Sass, Less)
103
- # ✔ Would you like to add Angular routing? (y/N)
104
- # Do you want to enable Server-Side Rendering (SSR)? (y/N)
105
- # ✔ Do you want to create a 'zoneless' application? (y/N)
106
- # ✔ Which AI tools do you want to configure? (◯ None ◯ Claude ◯ Cursor...)
115
+ # Skip all prompts by providing all options via CLI flags
116
+ npx create-ng-tailwind my-app --template=starter
117
+
118
+ # With more options
119
+ npx create-ng-tailwind my-app --template=starter --ssr --zoneless --ai-config=cursor
120
+
121
+ # Or use short flag for template
122
+ npx create-ng-tailwind my-app -t starter
107
123
  ```
108
124
 
109
125
  #### Other Options
126
+
110
127
  ```bash
111
- # Custom directory
112
- npx create-ng-tailwind my-app --directory=./projects/my-app
128
+ # Skip npm install (for CI/CD or manual installation later)
129
+ npx create-ng-tailwind my-app --template=starter --skip-install
113
130
 
114
- # Skip installation (for CI/CD)
115
- npx create-ng-tailwind my-app --skip-install
131
+ # Disable routing
132
+ npx create-ng-tailwind my-app --template=starter --no-routing
116
133
 
117
- # Combine flags with interactive mode (flags override prompts)
118
- npx create-ng-tailwind my-app --interactive --style=scss --routing
134
+ # Combine multiple flags
135
+ npx create-ng-tailwind my-app --template=starter --ssr --zoneless --skip-install
119
136
  ```
120
137
 
121
138
  ## What's Included
122
139
 
123
140
  ### 📦 Dependencies
141
+
124
142
  - **Angular 20** - Latest Angular framework
125
143
  - **Tailwind CSS** - Utility-first CSS framework
126
144
  - **@tailwindcss/postcss** - Modern PostCSS plugin for Tailwind
127
145
  - **PostCSS** - CSS processing tool
128
146
 
129
147
  ### 🎨 Preconfigured Setup
148
+
130
149
  - Modern PostCSS configuration (`.postcssrc.json`)
131
150
  - Tailwind CSS import in styles file
132
151
  - Example components with Tailwind classes
133
152
  - Responsive design examples
134
153
  - Zero configuration required
135
154
 
136
- ### 🎯 Why CSS Works Best with Tailwind
155
+ ### 🎯 CSS-Only Approach (Tailwind v4 Official)
137
156
 
138
- **Plain CSS is recommended for Tailwind projects because:**
157
+ **We use CSS exclusively for Tailwind v4 compatibility:**
139
158
 
140
- - **🚀 Simpler Build Process** - No SCSS compilation needed
141
- - **⚡ Faster Builds** - Less processing overhead
142
- - **🎨 Tailwind is Utility-First** - Most styling is done via classes, not custom CSS
143
- - **🛠️ Tailwind @apply Works in CSS** - You can still use `@apply` directive
144
- - **📦 Smaller Bundle Size** - No SCSS runtime needed
145
- - **🔧 Less Configuration** - Fewer build tools to configure
159
+ - **✅ Official Tailwind v4 Approach** - Tailwind v4 no longer supports preprocessors (SCSS/Sass/Less)
160
+ - **🚀 Simpler Build Process** - No preprocessor compilation needed
161
+ - **⚡ Faster Builds** - Direct PostCSS processing with LightningCSS
162
+ - **🎨 Modern CSS Features** - CSS nesting, variables, and modern features built-in
163
+ - **🛠️ Full Tailwind Support** - All Tailwind directives work seamlessly
164
+ - **📦 Smaller Bundle Size** - No preprocessor runtime needed
165
+ - **🔧 Zero Configuration** - Works out of the box with Angular CLI
146
166
 
147
- **When to use SCSS/Sass:**
148
- - You have existing SCSS components to migrate
149
- - You prefer nesting for the few custom styles you write
150
- - Your team is more comfortable with SCSS
167
+ **Note:** Tailwind CSS v4 uses LightningCSS internally and does not support SCSS, Sass, or Less preprocessors. Modern CSS provides nesting and other features previously requiring preprocessors.
168
+
169
+ ### 🏗️ Project Structure (Starter Template)
151
170
 
152
- ### 🏗️ Project Structure
153
171
  ```
154
172
  my-app/
155
173
  ├── src/
156
174
  │ ├── app/
157
- │ │ ├── app.component.html # Beautiful example with Tailwind
158
- │ │ ├── app.component.ts # Traditional Angular component
159
- │ │ ├── app.component.css # Component styles
160
- │ │ ├── app.component.spec.ts # Component tests
161
- │ │ ├── app.config.ts # App configuration
162
- │ │ └── ...
163
- │ ├── styles.css # Tailwind import included
164
- │ ├── main.ts # Bootstrap with AppComponent
165
- └── ...
166
- ├── .postcssrc.json # Modern PostCSS configuration
175
+ │ │ ├── core/ # Core services and interceptors
176
+ │ │ ├── services/ # Auth, API, Toast, Modal, etc.
177
+ │ │ ├── interceptors/ # HTTP interceptors
178
+ │ │ ├── guards/ # Route guards
179
+ │ │ │ └── i18n/ # Translation service
180
+ │ │ ├── shared/ # Shared components and utilities
181
+ │ │ ├── components/ # Button, Card, Toast, Modal
182
+ │ │ ├── pipes/ # Truncate, TimeAgo
183
+ │ │ ├── directives/ # ClickOutside, Tooltip
184
+ │ │ │ └── models/ # TypeScript interfaces
185
+ │ │ ├── features/ # Feature modules
186
+ │ │ │ ├── home/ # Home page
187
+ │ │ │ ├── about/ # About page
188
+ │ │ │ ├── contact/ # Contact page
189
+ │ │ │ └── auth/ # Authentication pages
190
+ │ │ ├── layout/ # Layout components
191
+ │ │ │ ├── header/ # Navigation header
192
+ │ │ │ └── footer/ # Footer component
193
+ │ │ ├── app.config.ts # App configuration
194
+ │ │ ├── app.routes.ts # Routing configuration
195
+ │ │ └── app.ts # Main app component
196
+ │ ├── styles.css # Tailwind CSS imports
197
+ │ └── main.ts # Bootstrap
198
+ ├── public/
199
+ │ └── assets/
200
+ │ └── i18n/ # Translation files (en.json, ar.json)
201
+ ├── .postcssrc.json # PostCSS configuration
167
202
  ├── package.json
168
203
  └── ...
169
204
  ```
170
205
 
171
- ## Interactive vs Non-Interactive Modes
206
+ ## 🚀 Interactive Mode
207
+
208
+ By default, the CLI works like `ng new` with interactive prompts:
172
209
 
173
- ### 🚀 Non-Interactive Mode (Default - Fast)
174
- Perfect for experienced developers and CI/CD:
175
210
  ```bash
176
211
  npx create-ng-tailwind my-app
177
- # ✔ Angular project created (5s)
178
- # ✔ Tailwind CSS configured
179
- # ✔ Project files configured
180
- # ✅ Project created successfully!
181
- ```
182
212
 
183
- ### 🎯 Interactive Mode (User-Friendly)
184
- Perfect for beginners and exploring options:
185
- ```bash
186
- npx create-ng-tailwind my-app --interactive
187
-
188
- 📋 Configure your Angular project:
189
-
190
- ? Which stylesheet format would you like to use? (Use arrow keys)
191
- ❯ CSS
192
- SCSS [ https://sass-lang.com/documentation/syntax#scss ]
193
- Sass [ https://sass-lang.com/documentation/syntax#the-indented-syntax ]
194
- Less [ https://lesscss.org ]
195
-
196
- ? Would you like to add Angular routing? (Y/n) y
197
- ? Do you want to enable Server-Side Rendering (SSR)? (y/N) n
198
- ? Do you want to create a 'zoneless' application without zone.js? (y/N) n
199
- ? Which AI tools do you want to configure? (Press <space> to select)
200
- ❯◉ None
201
- ◯ Claude
202
- ◯ Cursor
203
- ◯ Gemini
204
- ◯ GitHub Copilot
205
- ◯ JetBrains AI Assistant
206
- ◯ Windsurf
207
-
208
- ✔ Angular project created
209
- ✔ Tailwind CSS configured
210
- ✔ Project files configured
213
+ ? Which template would you like to use? › Starter
214
+ ? Enable Server-Side Rendering (SSR)? › No
215
+ ? Create zoneless application? › No
216
+ ? Configure AI tools? › None
217
+
211
218
  ✅ Project created successfully!
212
219
  ```
213
220
 
214
- ## Example Output
215
-
216
- After running the CLI, you'll get a beautiful Angular app with:
221
+ **Fast Mode**: Skip prompts by providing flags:
217
222
 
218
- - 🎨 Modern gradient background
219
- - 💳 Card-based layout
220
- - 📱 Responsive grid system
221
- - 🔘 Interactive buttons
222
- - 🎯 Tailwind utility examples
223
- - 📚 Link to Tailwind documentation
224
- - ⚙️ Traditional Angular file structure (`*.component.*`)
223
+ ```bash
224
+ npx create-ng-tailwind my-app --template=starter
225
+ ```
225
226
 
226
- ## Development
227
+ ## 🎯 Starter Template Features
227
228
 
228
- ### Prerequisites
229
- - Node.js 18+
230
- - npm or yarn
229
+ The **Starter Template** includes 20+ production-ready features:
231
230
 
232
- ### Local Development
231
+ ### Core Services
233
232
 
234
- 1. Clone this repository
235
- ```bash
236
- git clone <your-repo-url>
237
- cd create-ng-tailwind
238
- ```
233
+ - **AuthService** - Authentication & user management
234
+ - **ApiService** - Centralized HTTP request handling
235
+ - **ToastService** - Notification system (success, error, warning, info)
236
+ - **ModalService** - Dialog system with confirm & alert
237
+ - **LoadingService** - Global loading state with signals
238
+ - **CacheService** - Response caching with TTL
239
+ - **StorageService** - LocalStorage wrapper with type safety
240
+ - **i18nService** - Internationalization management
239
241
 
240
- 2. Install dependencies
241
- ```bash
242
- npm install
243
- ```
242
+ ### UI Components
244
243
 
245
- 3. Test locally
246
- ```bash
247
- npm run dev -- my-test-app
248
- ```
244
+ - **ButtonComponent** - Variants: primary, secondary, danger
245
+ - **CardComponent** - Flexible container with title & shadow
246
+ - **LoadingSpinnerComponent** - Animated loading indicator
247
+ - **ToastComponent** - Auto-dismiss notifications
248
+ - **ModalComponent** - Accessible dialog with sizes
249
249
 
250
- 4. Link for global testing
251
- ```bash
252
- npm link
253
- create-ng-tailwind test-app
254
- ```
250
+ ### Utilities
255
251
 
256
- ### Publishing
252
+ - **Pipes** - Truncate, TimeAgo, FileSize, SafeHtml
253
+ - **Directives** - ClickOutside, Tooltip
254
+ - **HTTP Interceptors** - Auth, Error handling, Loading, Caching
255
+ - **TypeScript Path Aliases** - Clean imports with `@core/*`, `@shared/*`, `@features/*`
257
256
 
258
- See [PUBLISHING.md](PUBLISHING.md) for detailed publishing instructions.
257
+ ### Internationalization
259
258
 
260
- ```bash
261
- # Quick publish (after setup)
262
- npm test && npm publish
263
- ```
264
-
265
- ## Roadmap
266
-
267
- ### Phase 1: CLI Tool ✅
268
- - [x] Basic Angular + Tailwind scaffolding
269
- - [x] Command line options (flags)
270
- - [x] Interactive prompts mode (`--interactive`)
271
- - [x] Beautiful starter template with Tailwind examples
272
- - [x] Zero-configuration setup
273
- - [x] Traditional Angular file naming (`*.component.*`)
274
- - [x] Modern Tailwind CSS setup (`@tailwindcss/postcss`)
275
- - [x] Non-interactive mode for CI/CD
276
- - [x] Angular 20+ features support (SSR, zoneless, AI tools)
277
- - [x] **Best Practice Defaults** (CSS + Routing + No AI tools)
278
-
279
- ### Phase 2: Angular Schematic (Coming Soon)
280
- - [ ] `ng add quick-start-angular` support
281
- - [ ] Integration with existing projects
282
- - [ ] Migration utilities
283
- - [ ] Workspace integration
284
-
285
- ### Phase 3: Enhanced Features (Future)
286
- - [ ] UI library integrations (Angular Material, PrimeNG, Ant Design)
287
- - [ ] Authentication boilerplate (Auth0, Firebase, JWT)
288
- - [ ] State management options (NgRx, Akita, Signal Store)
289
- - [ ] Testing setup (Jest, Cypress, Playwright)
290
- - [ ] PWA configuration
291
- - [ ] Docker setup
292
- - [ ] CI/CD templates (GitHub Actions, GitLab CI)
293
- - [ ] Monorepo support (Nx integration)
294
-
295
- ## 🤝 Contributing
296
-
297
- We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
298
-
299
- **Quick Start for Contributors:**
300
- ```bash
301
- git clone https://github.com/TEHSEENULLAH786/create-ng-tailwind.git
302
- cd create-ng-tailwind
303
- npm install
304
- npm run dev my-test-project # Test your changes
305
- npm test # Run tests
306
- ```
259
+ - **Complete i18n Support** - English & Arabic with RTL support
260
+ - **Language Switcher** - Built-in header component
261
+ - **Translation Files** - JSON-based translation system
307
262
 
308
263
  ## 📄 License
309
264
 
310
265
  MIT License - see the [LICENSE](LICENSE) file for details.
311
266
 
312
- ## 🙏 Support
267
+ ## 🙏 Support & Community
313
268
 
314
269
  If you find this tool helpful, please consider:
315
270
 
316
- <div align="center">
317
-
318
- [![GitHub stars](https://img.shields.io/github/stars/TEHSEENULLAH786/create-ng-tailwind.svg?style=social&label=Star)](https://github.com/TEHSEENULLAH786/create-ng-tailwind)
319
- [![GitHub Follow](https://img.shields.io/github/followers/TEHSEENULLAH786.svg?style=social&label=Follow)](https://github.com/TEHSEENULLAH786)
320
-
321
- </div>
322
-
323
- - ⭐ **Star the repository** on GitHub
324
- - 🐛 **Report bugs** via GitHub Issues
325
- - 💡 **Suggest features** in Discussions
326
- - 📝 **Contribute** to the codebase
271
+ - ⭐ **Star the package** on [npm](https://www.npmjs.com/package/create-ng-tailwind)
327
272
  - 🔄 **Share** with your developer friends
328
- - **Buy us a coffee** (optional donation link)
329
-
330
- ## 🏆 Contributors
331
-
332
- Thanks to these amazing people:
333
-
334
- <div align="center">
335
-
336
- <!-- Contributors will be automatically added here -->
337
- [![Contributors](https://contrib.rocks/image?repo=TEHSEENULLAH786/create-ng-tailwind)](https://github.com/TEHSEENULLAH786/create-ng-tailwind/graphs/contributors)
338
-
339
- *Become a contributor by submitting your first PR!*
340
-
341
- </div>
342
-
343
- ## 📊 Package Stats
344
-
345
- <div align="center">
346
-
347
- [![NPM](https://nodei.co/npm/create-ng-tailwind.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/create-ng-tailwind)
348
-
349
- </div>
350
-
351
- ## 🔗 Related Projects
352
-
353
- | Project | Description |
354
- |---------|-------------|
355
- | [Angular CLI](https://angular.io/cli) | Official Angular command-line interface |
356
- | [Tailwind CSS](https://tailwindcss.com/) | Utility-first CSS framework |
357
- | [Create React App](https://create-react-app.dev/) | Similar tool for React |
358
- | [Vite](https://vitejs.dev/) | Fast build tool for web projects |
359
- | [Nx](https://nx.dev/) | Smart monorepos for Angular |
360
-
361
- ## 📱 Connect With Us
362
-
363
- <div align="center">
364
-
365
- [![GitHub](https://img.shields.io/badge/GitHub-TEHSEENULLAH786-181717)](https://github.com/TEHSEENULLAH786)
366
- [![Email](https://img.shields.io/badge/Email-tehseen__ullah786@hotmail.com-red)](mailto:tehseen_ullah786@hotmail.com)
367
-
368
- </div>
273
+ - 📧 **Contact**: [tehseen_ullah786@hotmail.com](mailto:tehseen_ullah786@hotmail.com)
369
274
 
370
275
  ---
371
276
 
372
277
  <div align="center">
373
278
 
374
- **🚀 Happy coding with Angular and Tailwind CSS!**
279
+ [![NPM](https://nodei.co/npm/create-ng-tailwind.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/create-ng-tailwind)
375
280
 
376
- *Built with ❤️ by developers, for developers*
281
+ **🚀 Happy coding with Angular and Tailwind CSS!**
377
282
 
378
- [⬆ Back to top](#create-angular--tailwind)
283
+ _Built with ❤️ by developers, for developers_
379
284
 
380
285
  </div>