create-ng-tailwind 2.0.2 โ†’ 3.0.0

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/CHANGELOG.md CHANGED
@@ -5,6 +5,126 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.0.0] - 2025-11-30
9
+
10
+ ### ๐Ÿ’ฅ Breaking Changes
11
+
12
+ - **Angular CLI Alignment**: Now fully relies on Angular CLI for project configuration
13
+ - Removed custom `ensureZoneJs()` method - Angular CLI handles zone.js natively
14
+ - Explicitly passes `--zoneless=false` or `--zoneless=true` to Angular CLI in non-interactive mode
15
+ - Projects now match exactly what `ng new` produces interactively
16
+
17
+ ### ๐Ÿ› Bug Fixes
18
+
19
+ - **zone.js Configuration**: Fixed issue where zone.js was not being properly configured when selecting "No" for zoneless application
20
+ - Fixes runtime error `NG0908: In this configuration Angular requires Zone.js`
21
+
22
+ ## [2.2.0] - 2025-11-01
23
+
24
+ ### โœจ New Features - Comprehensive Tailwind v4 Theming System
25
+
26
+ - **Complete Theme System using Tailwind v4 @theme directive**:
27
+ - Added comprehensive color theming with 7 semantic color scales (primary, secondary, accent, success, danger, warning, info)
28
+ - Each color includes full 50-950 scale for maximum flexibility
29
+ - All colors defined using modern `@theme` directive in `styles.css`
30
+ - Automatic utility class generation (bg-*, text-*, border-*, ring-*, etc.)
31
+
32
+ - **Theme Customization**:
33
+ - Easy customization by editing CSS custom properties in `styles.css`
34
+ - Clear documentation and usage examples in theme configuration
35
+ - All components automatically update when theme colors change
36
+ - No JavaScript configuration needed - pure CSS approach
37
+
38
+ - **Updated All Components to Use Theme Colors**:
39
+ - ButtonComponent: Uses primary, secondary, and danger theme colors
40
+ - ToastComponent: Uses success, danger, warning, and info colors
41
+ - LoadingSpinnerComponent: Supports all theme color variants
42
+ - Contact page: Gradient backgrounds using primary, secondary, and accent
43
+ - Header component: Navigation and active states use primary theme
44
+ - Home & About pages: Hero sections and feature cards use theme colors
45
+ - Auth pages: Login, Register, Forgot Password use primary theme
46
+ - Footer: Links use primary theme colors
47
+
48
+ - **Developer Experience**:
49
+ - Comprehensive inline documentation in `styles.css`
50
+ - Usage examples for all theme colors
51
+ - Clear instructions for customization
52
+ - Consistent color usage across all generated components
53
+
54
+ ### ๐ŸŽจ Design Improvements
55
+
56
+ - Replaced all hardcoded blue, cyan, red, green colors with semantic theme colors
57
+ - Updated gradients to use primary-secondary-accent combinations
58
+ - Error states now use danger theme color instead of hardcoded red
59
+ - Success states use success theme color instead of hardcoded green
60
+ - Info messages use info theme color
61
+ - Warning states use warning theme color
62
+
63
+ ## [2.1.1] - 2025-10-30
64
+
65
+ ### ๐Ÿ› Fixed
66
+
67
+ - **SSR Hydration Error in Contact Form**: Fixed NG0500 hydration mismatch in contact component textarea
68
+ - Removed whitespace between textarea opening and closing tags
69
+ - Prevents "Angular expected a text node but the node was not found" error
70
+ - Ensures proper SSR hydration when Server-Side Rendering is enabled
71
+
72
+ - **AI Config Prettier Formatting**: All AI configuration templates (CLAUDE.md, .cursorrules, .windsurfrules) now pass Prettier formatting checks automatically
73
+ - Added empty lines before code blocks for proper markdown formatting
74
+ - Added parentheses around arrow function parameters (arrowParens: "always")
75
+ - Reordered Tailwind CSS classes according to prettier-plugin-tailwindcss
76
+ - Added trailing commas in objects and arrays per Prettier config
77
+ - Fixed HTML example indentation and structure
78
+ - Renamed Claude file to CLAUDE.md (uppercase) to match Angular CLI convention
79
+ - Scaffolded projects now pass `npm run format:check` without manual fixes
80
+
81
+ ## [2.1.0] - 2025-10-28
82
+
83
+ ### โœจ New Features - Simple SEO Solution
84
+
85
+ - **Simple SEO Service** (Easy to use, easy to extend):
86
+ - โœ… Dynamic meta tags (title, description, keywords)
87
+ - โœ… Open Graph tags for social sharing (Facebook, LinkedIn)
88
+ - โœ… Twitter Card tags for optimized sharing
89
+ - โœ… Canonical URL management (auto-updated on route changes)
90
+ - โœ… Structured data (JSON-LD) support
91
+ - ๐ŸŽฏ **Only 2 methods**: `updateMeta()` and `addStructuredData()` - that's it!
92
+ - ๐Ÿ“ Well-documented with clear examples
93
+ - ๐Ÿ”ง Developers can easily extend with more features as needed
94
+
95
+ - **Essential Structured Data**:
96
+ - โœ… Organization schema (company info, logo, social profiles)
97
+ - โœ… WebSite schema (site name, description)
98
+ - ๐Ÿ’ก Comment in code shows how to add more schemas (Article, Product, FAQ, etc.)
99
+ - ๐ŸŽฏ Keep it simple - only what's actually being used
100
+
101
+ - **SEO Assets**:
102
+ - `robots.txt` - Properly configured for Angular apps with sitemap reference
103
+ - Default Open Graph image (1200x630px SVG placeholder)
104
+ - Complete favicon set (SVG with project initial)
105
+ - Apple Touch Icon for iOS devices
106
+ - Android Chrome icons (192x192 and 512x512)
107
+ - Logo SVG with project branding
108
+ - All placeholders include clear instructions for replacement
109
+
110
+ - **Pre-Integrated & Ready to Use**:
111
+ - โœ… All page components (Home, About, Contact) have SEO meta tags configured
112
+ - โœ… App component includes Organization and WebSite structured data
113
+ - โœ… SEO service auto-updates canonical URLs on navigation
114
+ - โœ… Works seamlessly with existing i18n system
115
+ - โœ… SSR-compatible for server-side rendering
116
+ - โœ… TypeScript interfaces for type safety
117
+ - โœ… Well-documented with JSDoc comments and usage examples
118
+
119
+ ### ๐Ÿงน Maintenance
120
+
121
+ - **Package Cleanup**: Removed CLAUDE.md from published package (internal development file)
122
+
123
+ ### ๐Ÿ› Fixed
124
+
125
+ - **LICENSE Link**: Fixed LICENSE link in README to work properly on npmjs.com (changed from relative link to descriptive text)
126
+ - **Directory Overwrite Flow**: Ensured consistent behavior between local and npx usage. Directory existence check now always happens AFTER configuration questions in both cases.
127
+
8
128
  ## [2.0.2] - 2025-10-24
9
129
 
10
130
  ### ๐Ÿ“ Documentation
package/README.md CHANGED
@@ -7,9 +7,7 @@
7
7
  [![Node.js Version](https://img.shields.io/node/v/create-ng-tailwind.svg)](https://nodejs.org/)
8
8
  [![Downloads](https://img.shields.io/npm/dm/create-ng-tailwind.svg)](https://www.npmjs.com/package/create-ng-tailwind)
9
9
 
10
- **๐Ÿš€ Create Angular projects with Tailwind CSS in seconds**
11
-
12
- _Zero configuration โ€ข Modern setup โ€ข Beautiful starter templates_
10
+ **๐Ÿš€ A CLI tool to give starter template for angular project with tailwind css**
13
11
 
14
12
  </div>
15
13
 
@@ -19,219 +17,99 @@ _Zero configuration โ€ข Modern setup โ€ข Beautiful starter templates_
19
17
 
20
18
  - ๐ŸŽฏ **Angular 20+** - Latest version with standalone components and signals
21
19
  - ๐ŸŽจ **Tailwind CSS v4** - Utility-first CSS framework preconfigured
20
+ - ๐Ÿš€ **SEO Optimized** - Meta tags, Open Graph, Twitter Cards, structured data, robots.txt
22
21
  - ๐ŸŒ **i18n Translation** - English & Arabic with RTL support
23
22
  - ๐ŸŽฎ **Interactive UI** - Toast notifications, Modal dialogs, and components
24
23
  - ๐Ÿ—๏ธ **Zero Configuration** - Everything set up and ready to go
25
- - ๐Ÿ’จ **Fast Setup** - Get started in seconds, not minutes
26
24
 
27
25
  ## Quick Start
28
26
 
29
27
  ### Using npx (Recommended)
30
28
 
29
+ Run the following command and follow the prompts:
30
+
31
31
  ```bash
32
32
  npx create-ng-tailwind my-awesome-app
33
- cd my-awesome-app
34
- ng serve
35
33
  ```
36
34
 
37
35
  ### Using npm
38
36
 
37
+ Install globally and use:
38
+
39
39
  ```bash
40
40
  npm install -g create-ng-tailwind
41
41
  create-ng-tailwind my-awesome-app
42
- cd my-awesome-app
43
- ng serve
44
- ```
45
-
46
- ## Usage
47
-
48
- ```bash
49
- create-ng-tailwind [project-name] [options]
50
42
  ```
51
43
 
52
- ### Options
53
-
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.
72
-
73
- #### AI Tools Options:
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
78
- - `claude` - Configure Claude integration
79
- - `cursor` - Configure Cursor integration
80
- - `gemini` - Configure Gemini integration
81
- - `copilot` - Configure GitHub Copilot integration
82
- - `jetbrains` - Configure JetBrains AI Assistant
83
- - `windsurf` - Configure Windsurf integration
44
+ ### What happens next?
84
45
 
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.
46
+ The CLI will guide you through:
47
+ 1. Choosing a template (Minimal or Starter)
48
+ 2. Configuring Server-Side Rendering (optional)
49
+ 3. Setting up zoneless application (optional)
50
+ 4. Selecting AI tools integration (optional)
86
51
 
87
- ### Examples
88
-
89
- #### Default Interactive Mode (Like `ng new`)
90
-
91
- ```bash
92
- # Run the CLI - it will prompt you for all options
93
- npx create-ng-tailwind my-app
94
-
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
110
- ```
111
-
112
- #### Quick Start with CLI Flags (Skip Prompts)
52
+ After setup completes:
113
53
 
114
54
  ```bash
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
55
+ cd my-awesome-app
56
+ npm install
57
+ ng serve
123
58
  ```
124
59
 
125
- #### Other Options
60
+ Your app will be running at `http://localhost:4200` ๐ŸŽ‰
126
61
 
127
- ```bash
128
- # Skip npm install (for CI/CD or manual installation later)
129
- npx create-ng-tailwind my-app --template=starter --skip-install
130
-
131
- # Disable routing
132
- npx create-ng-tailwind my-app --template=starter --no-routing
133
-
134
- # Combine multiple flags
135
- npx create-ng-tailwind my-app --template=starter --ssr --zoneless --skip-install
136
- ```
137
-
138
- ## What's Included
139
-
140
- ### ๐Ÿ“ฆ Dependencies
141
-
142
- - **Angular 20** - Latest Angular framework
143
- - **Tailwind CSS** - Utility-first CSS framework
144
- - **@tailwindcss/postcss** - Modern PostCSS plugin for Tailwind
145
- - **PostCSS** - CSS processing tool
146
-
147
- ### ๐ŸŽจ Preconfigured Setup
148
-
149
- - Modern PostCSS configuration (`.postcssrc.json`)
150
- - Tailwind CSS import in styles file
151
- - Example components with Tailwind classes
152
- - Responsive design examples
153
- - Zero configuration required
154
-
155
- ### ๐ŸŽฏ CSS-Only Approach (Tailwind v4 Official)
156
-
157
- **We use CSS exclusively for Tailwind v4 compatibility:**
158
-
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
166
-
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)
62
+ ## ๐Ÿ—๏ธ Project Structure
170
63
 
171
64
  ```
172
65
  my-app/
173
66
  โ”œโ”€โ”€ src/
174
67
  โ”‚ โ”œโ”€โ”€ app/
175
68
  โ”‚ โ”‚ โ”œโ”€โ”€ core/ # Core services and interceptors
176
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ services/ # Auth, API, Toast, Modal, etc.
69
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ services/ # Auth, API, SEO, Toast, Modal, etc.
177
70
  โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ 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
71
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ guards/ # Route guards
72
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ i18n/ # Translation service
73
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ utils/ # Structured data utilities
74
+ โ”‚ โ”‚ โ”œโ”€โ”€ shared/ # Shared components and utilities
75
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ components/ # Button, Card, Toast, Modal
76
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ pipes/ # Truncate, TimeAgo
77
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ directives/ # ClickOutside, Tooltip
78
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ models/ # TypeScript interfaces
79
+ โ”‚ โ”‚ โ”œโ”€โ”€ features/ # Feature modules
80
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ home/ # Home page
81
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ about/ # About page
82
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ contact/ # Contact page
83
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ auth/ # Authentication pages
84
+ โ”‚ โ”‚ โ”œโ”€โ”€ layout/ # Layout components
85
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ header/ # Navigation header
86
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ footer/ # Footer component
87
+ โ”‚ โ”‚ โ”œโ”€โ”€ app.config.ts # App configuration
88
+ โ”‚ โ”‚ โ”œโ”€โ”€ app.routes.ts # Routing configuration
89
+ โ”‚ โ”‚ โ””โ”€โ”€ app.ts # Main app component
90
+ โ”‚ โ”œโ”€โ”€ styles.css # Tailwind CSS imports
91
+ โ”‚ โ””โ”€โ”€ main.ts # Bootstrap
198
92
  โ”œโ”€โ”€ public/
199
- โ”‚ โ””โ”€โ”€ assets/
200
- โ”‚ โ””โ”€โ”€ i18n/ # Translation files (en.json, ar.json)
201
- โ”œโ”€โ”€ .postcssrc.json # PostCSS configuration
93
+ โ”‚ โ”œโ”€โ”€ assets/
94
+ โ”‚ โ”‚ โ”œโ”€โ”€ i18n/ # Translation files (en.json, ar.json)
95
+ โ”‚ โ”‚ โ””โ”€โ”€ images/ # OG images, logos
96
+ โ”‚ โ”œโ”€โ”€ robots.txt # SEO robots file
97
+ โ”‚ โ”œโ”€โ”€ favicon.svg # Favicon
98
+ โ”‚ โ””โ”€โ”€ android-chrome-*.svg # PWA icons
99
+ โ”œโ”€โ”€ .postcssrc.json # PostCSS configuration
202
100
  โ”œโ”€โ”€ package.json
203
101
  โ””โ”€โ”€ ...
204
102
  ```
205
103
 
206
- ## ๐Ÿš€ Interactive Mode
207
-
208
- By default, the CLI works like `ng new` with interactive prompts:
209
-
210
- ```bash
211
- npx create-ng-tailwind my-app
212
-
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
-
218
- โœ… Project created successfully!
219
- ```
220
-
221
- **Fast Mode**: Skip prompts by providing flags:
222
-
223
- ```bash
224
- npx create-ng-tailwind my-app --template=starter
225
- ```
226
-
227
104
  ## ๐ŸŽฏ Starter Template Features
228
105
 
229
- The **Starter Template** includes 20+ production-ready features:
106
+ The **Starter Template** includes 25+ production-ready features:
230
107
 
231
108
  ### Core Services
232
109
 
233
110
  - **AuthService** - Authentication & user management
234
111
  - **ApiService** - Centralized HTTP request handling
112
+ - **SeoService** - Comprehensive SEO management (meta tags, Open Graph, Twitter Cards, structured data)
235
113
  - **ToastService** - Notification system (success, error, warning, info)
236
114
  - **ModalService** - Dialog system with confirm & alert
237
115
  - **LoadingService** - Global loading state with signals
@@ -239,6 +117,16 @@ The **Starter Template** includes 20+ production-ready features:
239
117
  - **StorageService** - LocalStorage wrapper with type safety
240
118
  - **i18nService** - Internationalization management
241
119
 
120
+ ### SEO Optimization (Simple & Ready to Use)
121
+
122
+ - **SEO Service** - Just 2 methods: `updateMeta()` and `addStructuredData()`
123
+ - **Meta Tags** - Title, description, keywords (auto-configured on all pages)
124
+ - **Social Sharing** - Open Graph & Twitter Cards (pre-configured)
125
+ - **Structured Data** - Organization & WebSite schemas (included)
126
+ - **Canonical URLs** - Auto-updated on route changes
127
+ - **Assets** - robots.txt, favicon set, OG image placeholder
128
+ - **Extensible** - Easy to add more schemas as needed
129
+
242
130
  ### UI Components
243
131
 
244
132
  - **ButtonComponent** - Variants: primary, secondary, danger
@@ -249,7 +137,7 @@ The **Starter Template** includes 20+ production-ready features:
249
137
 
250
138
  ### Utilities
251
139
 
252
- - **Pipes** - Truncate, TimeAgo, FileSize, SafeHtml
140
+ - **Pipes** - Truncate, TimeAgo
253
141
  - **Directives** - ClickOutside, Tooltip
254
142
  - **HTTP Interceptors** - Auth, Error handling, Loading, Caching
255
143
  - **TypeScript Path Aliases** - Clean imports with `@core/*`, `@shared/*`, `@features/*`
@@ -260,9 +148,63 @@ The **Starter Template** includes 20+ production-ready features:
260
148
  - **Language Switcher** - Built-in header component
261
149
  - **Translation Files** - JSON-based translation system
262
150
 
151
+ ### Additional Features
152
+
153
+ - **Routing** - Pre-configured with lazy loading
154
+ - **Authentication Pages** - Login, Register, Forgot Password
155
+ - **Example Pages** - Home, About, Contact with reactive forms
156
+ - **PWA Support** - Service worker configuration
157
+ - **Linting & Formatting** - ESLint + Prettier + Husky pre-commit hooks (all files pass formatting checks out of the box)
158
+ - **Modern Stack** - Tailwind v4, TypeScript, Signals
159
+
160
+ ## ๐ŸŽจ Tailwind CSS v4
161
+
162
+ This tool uses **Tailwind CSS v4** with the official PostCSS approach:
163
+
164
+ - โœ… **Modern PostCSS Plugin** - `@tailwindcss/postcss`
165
+ - โšก **LightningCSS** - Fast CSS processing
166
+ - ๐ŸŽจ **Modern CSS Features** - Nesting, variables, and more built-in
167
+ - ๐Ÿš€ **Simplified Build** - No preprocessors needed
168
+
169
+ **Note:** Tailwind v4 does not support SCSS, Sass, or Less. Modern CSS provides all the features you need!
170
+
171
+ ### ๐ŸŽจ Comprehensive Theming System
172
+
173
+ The starter template includes a **powerful Tailwind v4 theming system** using the `@theme` directive:
174
+
175
+ **Theme Colors:**
176
+ - `primary` - Main brand color (with full 50-950 scale)
177
+ - `secondary` - Secondary brand color (with full 50-950 scale)
178
+ - `accent` - Accent/highlight color (with full 50-950 scale)
179
+ - `success` - Success states (green)
180
+ - `danger` - Error/danger states (red)
181
+ - `warning` - Warning states (yellow/orange)
182
+ - `info` - Informational states (blue)
183
+
184
+ **Customization:**
185
+ Simply edit `src/styles.css` and change the color values in the `@theme` block. All components automatically update!
186
+
187
+ ```css
188
+ @theme {
189
+ --color-primary-500: #3b82f6; /* Change this to your brand color */
190
+ --color-secondary-500: #06b6d4;
191
+ --color-accent-500: #a855f7;
192
+ /* ... complete color scales included */
193
+ }
194
+ ```
195
+
196
+ **Usage in templates:**
197
+ ```html
198
+ <div class="bg-primary-600 text-white">Primary button</div>
199
+ <div class="bg-secondary-500">Secondary element</div>
200
+ <p class="text-danger-600">Error message</p>
201
+ ```
202
+
203
+ All UI components, pages, and layouts use these theme colors, making it easy to rebrand your entire application by changing a few color values!
204
+
263
205
  ## ๐Ÿ“„ License
264
206
 
265
- MIT License - see the [LICENSE](LICENSE) file for details.
207
+ MIT License - see the LICENSE file included in the package.
266
208
 
267
209
  ## ๐Ÿ™ Support & Community
268
210
 
@@ -278,8 +220,4 @@ If you find this tool helpful, please consider:
278
220
 
279
221
  [![NPM](https://nodei.co/npm/create-ng-tailwind.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/create-ng-tailwind)
280
222
 
281
- **๐Ÿš€ Happy coding with Angular and Tailwind CSS!**
282
-
283
- _Built with โค๏ธ by developers, for developers_
284
-
285
223
  </div>
@@ -1,9 +1,8 @@
1
- const fs = require("fs-extra");
2
- const path = require("path");
3
- const execa = require("execa");
4
- const TailwindManager = require("./TailwindManager");
5
- const TemplateManager = require("./TemplateManager");
6
- const { createAIConfigs } = require("../utils/ai-config");
1
+ const fs = require('fs-extra');
2
+ const execa = require('execa');
3
+ const TailwindManager = require('./TailwindManager');
4
+ const TemplateManager = require('./TemplateManager');
5
+ const { createAIConfigs } = require('../utils/ai-config');
7
6
 
8
7
  class ProjectManager {
9
8
  constructor(config, logger) {
@@ -14,19 +13,19 @@ class ProjectManager {
14
13
  }
15
14
 
16
15
  async create() {
17
- // Check if directory exists
16
+ // Check if directory exists (after all configuration questions)
18
17
  if (await fs.pathExists(this.config.fullPath)) {
19
18
  const { overwrite } = await this.logger.prompt([
20
19
  {
21
- type: "confirm",
22
- name: "overwrite",
23
- message: `Directory ${this.config.projectName} already exists. Overwrite?`,
20
+ type: 'confirm',
21
+ name: 'overwrite',
22
+ message: `Directory ${this.config.projectName} already exists. Do you want to overwrite it?`,
24
23
  default: false,
25
24
  },
26
25
  ]);
27
26
 
28
27
  if (!overwrite) {
29
- this.logger.warn("Operation cancelled");
28
+ this.logger.warn('Operation cancelled');
30
29
  process.exit(0);
31
30
  }
32
31
 
@@ -43,37 +42,30 @@ class ProjectManager {
43
42
  await this.templateManager.apply();
44
43
 
45
44
  // Create AI configuration files (CLAUDE.md + tool-specific)
46
- await createAIConfigs(
47
- this.config.fullPath,
48
- this.config.projectName,
49
- this.config.aiConfig,
50
- );
45
+ await createAIConfigs(this.config.fullPath, this.config.projectName, this.config.aiConfig);
51
46
  }
52
47
 
53
48
  async createAngularProject() {
54
- const spinner = this.logger.spinner("Creating Angular project...");
49
+ const spinner = this.logger.spinner('Creating Angular project...');
55
50
 
56
51
  try {
57
52
  // Build ng new command with user's choices
58
53
  const routing = this.config.routing !== false;
59
54
  const ssr = this.config.ssr || false;
60
55
  const zoneless = this.config.zoneless || false;
61
- const aiConfig = this.config.aiConfig || ["none"];
56
+ const aiConfig = this.config.aiConfig || ['none'];
62
57
 
63
58
  let cmd = `npx @angular/cli@latest new ${this.config.projectName}`;
64
59
  cmd += ` --routing=${routing}`;
65
60
  cmd += ` --style=css`; // Always use CSS (Tailwind v4 official approach)
66
61
  cmd += ` --ssr=${ssr}`;
67
-
68
- if (zoneless) {
69
- cmd += ` --zoneless`;
70
- }
62
+ cmd += ` --zoneless=${zoneless}`;
71
63
 
72
64
  // Add AI config - Angular CLI supports multiple --ai-config flags
73
- if (aiConfig.length > 0 && !aiConfig.includes("none")) {
65
+ if (aiConfig.length > 0 && !aiConfig.includes('none')) {
74
66
  // Add each AI tool as a separate --ai-config flag
75
67
  aiConfig.forEach((tool) => {
76
- if (tool !== "none") {
68
+ if (tool !== 'none') {
77
69
  cmd += ` --ai-config=${tool}`;
78
70
  }
79
71
  });
@@ -83,12 +75,12 @@ class ProjectManager {
83
75
 
84
76
  await execa.command(cmd, {
85
77
  cwd: process.cwd(),
86
- stdio: "pipe",
78
+ stdio: 'pipe',
87
79
  });
88
80
 
89
- spinner.succeed("Angular project created");
81
+ spinner.succeed('Angular project created');
90
82
  } catch (error) {
91
- spinner.fail("Failed to create Angular project");
83
+ spinner.fail('Failed to create Angular project');
92
84
  throw error;
93
85
  }
94
86
  }
@@ -284,12 +284,11 @@ export class ToastService {
284
284
 
285
285
  async function createToastComponent(config) {
286
286
  const toastComponent = `import { Component, inject } from '@angular/core';
287
- import { CommonModule } from '@angular/common';
288
287
  import { ToastService, Toast } from '@core/services/toast.service';
289
288
 
290
289
  @Component({
291
290
  selector: 'app-toast',
292
- imports: [CommonModule],
291
+ imports: [],
293
292
  template: \`
294
293
  <!-- Toast Container -->
295
294
  <div class="fixed top-4 right-4 z-50 space-y-2 max-w-sm w-full">
@@ -302,22 +301,22 @@ import { ToastService, Toast } from '@core/services/toast.service';
302
301
  <div class="shrink-0">
303
302
  @switch (toast.type) {
304
303
  @case ('success') {
305
- <svg class="h-6 w-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
304
+ <svg class="h-6 w-6 text-success-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
306
305
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
307
306
  </svg>
308
307
  }
309
308
  @case ('error') {
310
- <svg class="h-6 w-6 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
309
+ <svg class="h-6 w-6 text-danger-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
311
310
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
312
311
  </svg>
313
312
  }
314
313
  @case ('warning') {
315
- <svg class="h-6 w-6 text-yellow-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
314
+ <svg class="h-6 w-6 text-warning-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
316
315
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
317
316
  </svg>
318
317
  }
319
318
  @case ('info') {
320
- <svg class="h-6 w-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
319
+ <svg class="h-6 w-6 text-primary-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
321
320
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
322
321
  </svg>
323
322
  }
@@ -364,10 +363,10 @@ export class ToastComponent {
364
363
  getToastClasses(toast: Toast): string {
365
364
  const baseClasses = 'border-l-4';
366
365
  const typeClasses = {
367
- success: 'bg-green-50 border-green-500',
368
- error: 'bg-red-50 border-red-500',
369
- warning: 'bg-yellow-50 border-yellow-500',
370
- info: 'bg-blue-50 border-blue-500'
366
+ success: 'bg-success-50 border-success-500',
367
+ error: 'bg-danger-50 border-danger-500',
368
+ warning: 'bg-warning-50 border-warning-500',
369
+ info: 'bg-info-50 border-info-500'
371
370
  };
372
371
 
373
372
  return \`\${baseClasses} \${typeClasses[toast.type]}\`;