create-ng-tailwind 2.0.1 โ†’ 2.1.1

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,87 @@ 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
+ ## [2.1.1] - 2025-10-30
9
+
10
+ ### ๐Ÿ› Fixed
11
+
12
+ - **SSR Hydration Error in Contact Form**: Fixed NG0500 hydration mismatch in contact component textarea
13
+ - Removed whitespace between textarea opening and closing tags
14
+ - Prevents "Angular expected a text node but the node was not found" error
15
+ - Ensures proper SSR hydration when Server-Side Rendering is enabled
16
+
17
+ - **AI Config Prettier Formatting**: All AI configuration templates (CLAUDE.md, .cursorrules, .windsurfrules) now pass Prettier formatting checks automatically
18
+ - Added empty lines before code blocks for proper markdown formatting
19
+ - Added parentheses around arrow function parameters (arrowParens: "always")
20
+ - Reordered Tailwind CSS classes according to prettier-plugin-tailwindcss
21
+ - Added trailing commas in objects and arrays per Prettier config
22
+ - Fixed HTML example indentation and structure
23
+ - Renamed Claude file to CLAUDE.md (uppercase) to match Angular CLI convention
24
+ - Scaffolded projects now pass `npm run format:check` without manual fixes
25
+
26
+ ## [2.1.0] - 2025-10-28
27
+
28
+ ### โœจ New Features - Simple SEO Solution
29
+
30
+ - **Simple SEO Service** (Easy to use, easy to extend):
31
+ - โœ… Dynamic meta tags (title, description, keywords)
32
+ - โœ… Open Graph tags for social sharing (Facebook, LinkedIn)
33
+ - โœ… Twitter Card tags for optimized sharing
34
+ - โœ… Canonical URL management (auto-updated on route changes)
35
+ - โœ… Structured data (JSON-LD) support
36
+ - ๐ŸŽฏ **Only 2 methods**: `updateMeta()` and `addStructuredData()` - that's it!
37
+ - ๐Ÿ“ Well-documented with clear examples
38
+ - ๐Ÿ”ง Developers can easily extend with more features as needed
39
+
40
+ - **Essential Structured Data**:
41
+ - โœ… Organization schema (company info, logo, social profiles)
42
+ - โœ… WebSite schema (site name, description)
43
+ - ๐Ÿ’ก Comment in code shows how to add more schemas (Article, Product, FAQ, etc.)
44
+ - ๐ŸŽฏ Keep it simple - only what's actually being used
45
+
46
+ - **SEO Assets**:
47
+ - `robots.txt` - Properly configured for Angular apps with sitemap reference
48
+ - Default Open Graph image (1200x630px SVG placeholder)
49
+ - Complete favicon set (SVG with project initial)
50
+ - Apple Touch Icon for iOS devices
51
+ - Android Chrome icons (192x192 and 512x512)
52
+ - Logo SVG with project branding
53
+ - All placeholders include clear instructions for replacement
54
+
55
+ - **Pre-Integrated & Ready to Use**:
56
+ - โœ… All page components (Home, About, Contact) have SEO meta tags configured
57
+ - โœ… App component includes Organization and WebSite structured data
58
+ - โœ… SEO service auto-updates canonical URLs on navigation
59
+ - โœ… Works seamlessly with existing i18n system
60
+ - โœ… SSR-compatible for server-side rendering
61
+ - โœ… TypeScript interfaces for type safety
62
+ - โœ… Well-documented with JSDoc comments and usage examples
63
+
64
+ ### ๐Ÿงน Maintenance
65
+
66
+ - **Package Cleanup**: Removed CLAUDE.md from published package (internal development file)
67
+
68
+ ### ๐Ÿ› Fixed
69
+
70
+ - **LICENSE Link**: Fixed LICENSE link in README to work properly on npmjs.com (changed from relative link to descriptive text)
71
+ - **Directory Overwrite Flow**: Ensured consistent behavior between local and npx usage. Directory existence check now always happens AFTER configuration questions in both cases.
72
+
73
+ ## [2.0.2] - 2025-10-24
74
+
75
+ ### ๐Ÿ“ Documentation
76
+
77
+ - **CHANGELOG**: Added v2.0.1 and v2.0.2 entries to published package
78
+ - **PUBLISHING.md**: Updated version references and simplified guidance
79
+
80
+ ## [2.0.1] - 2025-10-24
81
+
82
+ ### ๐Ÿ“ Documentation Improvements
83
+
84
+ - **README Enhancements**: Removed "Related Projects" section, consolidated duplicate support sections, improved project structure documentation
85
+ - **Terminal Output**: Simplified CLI output to be minimal and professional with green checkmarks and white text
86
+ - **Accuracy Fixes**: Corrected pipe count from 4 to 2 (Truncate, TimeAgo) in all documentation and translations
87
+ - **Better Organization**: Enhanced "Starter Template Features" section with detailed breakdown of core services, UI components, and utilities
88
+
8
89
  ## [2.0.0] - 2025-01-20
9
90
 
10
91
  **Major Release with Breaking Changes** - This release includes significant updates to the CLI architecture, template system, and development workflow. Review the breaking changes and migration guide below before upgrading.
@@ -177,16 +258,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
177
258
  #### Breaking Changes Impact:
178
259
 
179
260
  1. **CSS-Only Approach**:
261
+
180
262
  - **Before (v1.x)**: `--style` flag supported css, scss, sass, less
181
263
  - **After (v2.0)**: Only CSS is supported (--style flag removed)
182
264
  - **Migration**: If you need SCSS, continue using v1.x or migrate to modern CSS
183
265
 
184
266
  2. **Template Names**:
267
+
185
268
  - **Before (v1.x)**: `--template=none`
186
269
  - **After (v2.0)**: `--template=minimal`
187
270
  - **Migration**: Update scripts to use `minimal` instead of `none`
188
271
 
189
272
  3. **Interactive Mode**:
273
+
190
274
  - **Before (v1.x)**: Non-interactive by default, `--interactive` flag to enable
191
275
  - **After (v2.0)**: Interactive by default, provide all flags to skip prompts
192
276
  - **Migration**: Add all required flags to CI/CD scripts for non-interactive mode
@@ -197,6 +281,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
197
281
  - **Migration**: Contact via email for support (tehseen_ullah786@hotmail.com)
198
282
 
199
283
  #### Recommended Update Command:
284
+
200
285
  ```bash
201
286
  # Update to v2.0.0
202
287
  npx create-ng-tailwind@latest my-app --template=minimal
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:
44
+ ### What happens next?
74
45
 
75
- When you select AI tools during setup, Angular CLI will automatically create configuration folders and files:
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)
76
51
 
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
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
-
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
123
- ```
124
-
125
- #### Other Options
126
-
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
55
+ cd my-awesome-app
56
+ npm install
57
+ ng serve
136
58
  ```
137
59
 
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:**
60
+ Your app will be running at `http://localhost:4200` ๐ŸŽ‰
158
61
 
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,29 @@ 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
+
263
171
  ## ๐Ÿ“„ License
264
172
 
265
- MIT License - see the [LICENSE](LICENSE) file for details.
173
+ MIT License - see the LICENSE file included in the package.
266
174
 
267
175
  ## ๐Ÿ™ Support & Community
268
176
 
@@ -278,8 +186,4 @@ If you find this tool helpful, please consider:
278
186
 
279
187
  [![NPM](https://nodei.co/npm/create-ng-tailwind.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/create-ng-tailwind)
280
188
 
281
- **๐Ÿš€ Happy coding with Angular and Tailwind CSS!**
282
-
283
- _Built with โค๏ธ by developers, for developers_
284
-
285
189
  </div>
@@ -14,13 +14,13 @@ class ProjectManager {
14
14
  }
15
15
 
16
16
  async create() {
17
- // Check if directory exists
17
+ // Check if directory exists (after all configuration questions)
18
18
  if (await fs.pathExists(this.config.fullPath)) {
19
19
  const { overwrite } = await this.logger.prompt([
20
20
  {
21
21
  type: "confirm",
22
22
  name: "overwrite",
23
- message: `Directory ${this.config.projectName} already exists. Overwrite?`,
23
+ message: `Directory ${this.config.projectName} already exists. Do you want to overwrite it?`,
24
24
  default: false,
25
25
  },
26
26
  ]);
@@ -2,7 +2,7 @@ const fs = require('fs-extra');
2
2
  const path = require('path');
3
3
 
4
4
  async function createContactComponent(config) {
5
- const contactComponentTs = `import { Component, inject } from '@angular/core';
5
+ const contactComponentTs = `import { Component, OnInit, inject } from '@angular/core';
6
6
  import { CommonModule } from '@angular/common';
7
7
  import { ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
8
8
  import { NgIconComponent, provideIcons } from '@ng-icons/core';
@@ -16,6 +16,7 @@ import {
16
16
  heroPaperAirplane,
17
17
  } from '@ng-icons/heroicons/outline';
18
18
  import { ButtonComponent } from '@shared/components/button/button.component';
19
+ import { SeoService } from '@core/services/seo.service';
19
20
 
20
21
  @Component({
21
22
  selector: 'app-contact',
@@ -30,12 +31,23 @@ import { ButtonComponent } from '@shared/components/button/button.component';
30
31
  })],
31
32
  templateUrl: './contact.component.html'
32
33
  })
33
- export class ContactComponent {
34
+ export class ContactComponent implements OnInit {
34
35
  private fb = inject(FormBuilder);
36
+ private seo = inject(SeoService);
35
37
 
36
38
  isSubmitting = false;
37
39
  submitted = false;
38
40
 
41
+ ngOnInit(): void {
42
+ // Set SEO meta tags for Contact page
43
+ this.seo.updateMeta({
44
+ title: 'Contact Us',
45
+ description: 'Get in touch with us. We would love to hear from you and answer any questions you may have.',
46
+ keywords: 'contact, support, get in touch, email',
47
+ ogType: 'website'
48
+ });
49
+ }
50
+
39
51
  contactForm = this.fb.group({
40
52
  name: ['', [Validators.required, Validators.minLength(2)]],
41
53
  email: ['', [Validators.required, Validators.email]],
@@ -197,8 +209,7 @@ export class ContactComponent {
197
209
  placeholder="Tell us more about your inquiry..."
198
210
  class="w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all resize-vertical"
199
211
  [class.border-red-500]="contactForm.get('message')?.invalid && contactForm.get('message')?.touched"
200
- [class.focus:ring-red-500]="contactForm.get('message')?.invalid && contactForm.get('message')?.touched">
201
- </textarea>
212
+ [class.focus:ring-red-500]="contactForm.get('message')?.invalid && contactForm.get('message')?.touched"></textarea>
202
213
  @if (contactForm.get('message')?.invalid && contactForm.get('message')?.touched) {
203
214
  <div class="mt-2 text-sm text-red-600 flex items-center gap-1">
204
215
  <svg class="h-4 w-4" fill="currentColor" viewBox="0 0 20 20">
@@ -499,7 +510,7 @@ export const appConfig: ApplicationConfig = {
499
510
  }
500
511
 
501
512
  async function createAppComponent(config) {
502
- const app = `import { Component, inject } from '@angular/core';
513
+ const app = `import { Component, OnInit, inject } from '@angular/core';
503
514
  import { CommonModule } from '@angular/common';
504
515
  import { RouterOutlet } from '@angular/router';
505
516
  import { HeaderComponent } from './layout/header/header.component';
@@ -507,6 +518,8 @@ import { FooterComponent } from './layout/footer/footer.component';
507
518
  import { ToastComponent } from '@shared/components/toast/toast.component';
508
519
  import { ModalComponent } from '@shared/components/modal/modal.component';
509
520
  import { TranslationService } from '@core/i18n/translation.service';
521
+ import { SeoService } from '@core/services/seo.service';
522
+ import { createOrganizationSchema, createWebSiteSchema } from '@core/utils/structured-data';
510
523
 
511
524
  @Component({
512
525
  selector: 'app-root',
@@ -529,10 +542,39 @@ import { TranslationService } from '@core/i18n/translation.service';
529
542
  </div>
530
543
  \`
531
544
  })
532
- export class App {
533
- // Inject translation service to initialize it (auto-detects and loads language)
545
+ export class App implements OnInit {
546
+ // Inject services
534
547
  private translationService = inject(TranslationService);
548
+ private seo = inject(SeoService);
549
+
535
550
  title = '${config.projectName}';
551
+
552
+ ngOnInit(): void {
553
+ // Add global Organization structured data
554
+ const organizationData = createOrganizationSchema({
555
+ name: '${config.projectName}',
556
+ url: 'https://example.com', // TODO: Update with your production URL
557
+ logo: '/assets/images/logo.svg',
558
+ description: 'A modern Angular application built with best practices',
559
+ sameAs: [
560
+ // 'https://twitter.com/yourhandle',
561
+ // 'https://facebook.com/yourpage',
562
+ // 'https://linkedin.com/company/yourcompany'
563
+ ]
564
+ });
565
+
566
+ const websiteData = createWebSiteSchema({
567
+ name: '${config.projectName}',
568
+ url: 'https://example.com', // TODO: Update with your production URL
569
+ description: 'A modern Angular application with Tailwind CSS, SEO optimization, and i18n support'
570
+ });
571
+
572
+ // Add structured data to the page
573
+ this.seo.addStructuredData({
574
+ '@context': 'https://schema.org',
575
+ '@graph': [organizationData, websiteData]
576
+ });
577
+ }
536
578
  }`;
537
579
 
538
580
  const appHtml = `<!-- This file is not used in standalone components -->