create-ng-tailwind 2.1.1 ā 3.0.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 +66 -0
- package/README.md +35 -1
- package/lib/managers/ProjectManager.js +17 -25
- package/lib/templates/starter/advanced-features.js +9 -10
- package/lib/templates/starter/features.js +180 -55
- package/lib/templates/starter/index.js +176 -230
- package/lib/templates/starter/seo-assets.js +6 -6
- package/lib/templates/starter/ui-features.js +1 -2
- package/lib/utils/ai-config.js +16 -20
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ function createDefaultOGImage(projectName) {
|
|
|
11
11
|
<defs>
|
|
12
12
|
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
13
13
|
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
|
14
|
-
<stop offset="100%" style="stop-color:#
|
|
14
|
+
<stop offset="100%" style="stop-color:#a855f7;stop-opacity:1" />
|
|
15
15
|
</linearGradient>
|
|
16
16
|
</defs>
|
|
17
17
|
<rect width="1200" height="630" fill="url(#grad)"/>
|
|
@@ -38,7 +38,7 @@ function createFavicon(projectName) {
|
|
|
38
38
|
<defs>
|
|
39
39
|
<linearGradient id="faviconGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
40
40
|
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
|
41
|
-
<stop offset="100%" style="stop-color:#
|
|
41
|
+
<stop offset="100%" style="stop-color:#a855f7;stop-opacity:1" />
|
|
42
42
|
</linearGradient>
|
|
43
43
|
</defs>
|
|
44
44
|
<rect width="32" height="32" rx="6" fill="url(#faviconGrad)"/>
|
|
@@ -58,7 +58,7 @@ function createAppleTouchIcon(projectName) {
|
|
|
58
58
|
<defs>
|
|
59
59
|
<linearGradient id="appleGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
60
60
|
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
|
61
|
-
<stop offset="100%" style="stop-color:#
|
|
61
|
+
<stop offset="100%" style="stop-color:#a855f7;stop-opacity:1" />
|
|
62
62
|
</linearGradient>
|
|
63
63
|
</defs>
|
|
64
64
|
<rect width="180" height="180" rx="40" fill="url(#appleGrad)"/>
|
|
@@ -78,7 +78,7 @@ function createAndroidIcon(projectName) {
|
|
|
78
78
|
<defs>
|
|
79
79
|
<linearGradient id="androidGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
80
80
|
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
|
81
|
-
<stop offset="100%" style="stop-color:#
|
|
81
|
+
<stop offset="100%" style="stop-color:#a855f7;stop-opacity:1" />
|
|
82
82
|
</linearGradient>
|
|
83
83
|
</defs>
|
|
84
84
|
<rect width="192" height="192" rx="48" fill="url(#androidGrad)"/>
|
|
@@ -98,7 +98,7 @@ function createAndroidIconLarge(projectName) {
|
|
|
98
98
|
<defs>
|
|
99
99
|
<linearGradient id="androidLargeGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
100
100
|
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
|
101
|
-
<stop offset="100%" style="stop-color:#
|
|
101
|
+
<stop offset="100%" style="stop-color:#a855f7;stop-opacity:1" />
|
|
102
102
|
</linearGradient>
|
|
103
103
|
</defs>
|
|
104
104
|
<rect width="512" height="512" rx="128" fill="url(#androidLargeGrad)"/>
|
|
@@ -118,7 +118,7 @@ function createLogo(projectName) {
|
|
|
118
118
|
<defs>
|
|
119
119
|
<linearGradient id="logoGrad" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
120
120
|
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
|
|
121
|
-
<stop offset="100%" style="stop-color:#
|
|
121
|
+
<stop offset="100%" style="stop-color:#a855f7;stop-opacity:1" />
|
|
122
122
|
</linearGradient>
|
|
123
123
|
</defs>
|
|
124
124
|
<rect width="50" height="50" x="5" y="5" rx="10" fill="url(#logoGrad)"/>
|
|
@@ -90,13 +90,12 @@ export class ModalService {
|
|
|
90
90
|
|
|
91
91
|
async function createModalComponent(config) {
|
|
92
92
|
const modalComponent = `import { Component, inject, HostListener } from '@angular/core';
|
|
93
|
-
import { CommonModule } from '@angular/common';
|
|
94
93
|
import { ModalService } from '@core/services/modal.service';
|
|
95
94
|
import { ButtonComponent } from '@shared/components/button/button.component';
|
|
96
95
|
|
|
97
96
|
@Component({
|
|
98
97
|
selector: 'app-modal',
|
|
99
|
-
imports: [
|
|
98
|
+
imports: [ButtonComponent],
|
|
100
99
|
template: \`
|
|
101
100
|
@if (modalService.isOpen()) {
|
|
102
101
|
<!-- Backdrop -->
|
package/lib/utils/ai-config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const fs = require(
|
|
2
|
-
const path = require(
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
|
+
const path = require('path');
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* AI Configuration Generator
|
|
@@ -50,7 +50,7 @@ src/app/
|
|
|
50
50
|
- **Forms:** Reactive Forms with validation
|
|
51
51
|
- **Routing:** Angular Router with lazy loading
|
|
52
52
|
- **Icons:** @ng-icons/heroicons
|
|
53
|
-
- **Linting:** ESLint + Prettier
|
|
53
|
+
- **Linting:** ESLint + Prettier
|
|
54
54
|
|
|
55
55
|
## šÆ Path Aliases (Use These!)
|
|
56
56
|
|
|
@@ -432,11 +432,11 @@ describe('ExampleComponent', () => {
|
|
|
432
432
|
`;
|
|
433
433
|
|
|
434
434
|
// Create .claude directory if it doesn't exist
|
|
435
|
-
const claudeDir = path.join(projectPath,
|
|
435
|
+
const claudeDir = path.join(projectPath, '.claude');
|
|
436
436
|
await fs.ensureDir(claudeDir);
|
|
437
437
|
|
|
438
438
|
// Write CLAUDE.md inside .claude folder (uppercase to match Angular CLI convention)
|
|
439
|
-
await fs.writeFile(path.join(claudeDir,
|
|
439
|
+
await fs.writeFile(path.join(claudeDir, 'CLAUDE.md'), claudeMd);
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
// ==================== CURSOR-SPECIFIC CONFIG ====================
|
|
@@ -518,7 +518,7 @@ Add keys to \`public/assets/i18n/en.json\` and \`ar.json\`
|
|
|
518
518
|
- No HttpClient directly (use ApiService)
|
|
519
519
|
`;
|
|
520
520
|
|
|
521
|
-
await fs.writeFile(path.join(projectPath,
|
|
521
|
+
await fs.writeFile(path.join(projectPath, '.cursorrules'), cursorRules);
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
// ==================== WINDSURF-SPECIFIC CONFIG ====================
|
|
@@ -596,7 +596,7 @@ public/assets/i18n/en.json + ar.json
|
|
|
596
596
|
No NgModule, No constructors, No custom CSS, No 'any', No src/assets
|
|
597
597
|
`;
|
|
598
598
|
|
|
599
|
-
await fs.writeFile(path.join(projectPath,
|
|
599
|
+
await fs.writeFile(path.join(projectPath, '.windsurfrules'), windsurfRules);
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
// ==================== MAIN EXPORT ====================
|
|
@@ -611,33 +611,29 @@ No NgModule, No constructors, No custom CSS, No 'any', No src/assets
|
|
|
611
611
|
*/
|
|
612
612
|
async function createAIConfigs(projectPath, projectName, aiTools) {
|
|
613
613
|
// Skip if user selected "none"
|
|
614
|
-
if (
|
|
615
|
-
!aiTools ||
|
|
616
|
-
aiTools.length === 0 ||
|
|
617
|
-
(aiTools.length === 1 && aiTools[0] === "none")
|
|
618
|
-
) {
|
|
614
|
+
if (!aiTools || aiTools.length === 0 || (aiTools.length === 1 && aiTools[0] === 'none')) {
|
|
619
615
|
return;
|
|
620
616
|
}
|
|
621
617
|
|
|
622
|
-
console.log(
|
|
618
|
+
console.log('\nš¤ Configuring AI tools...');
|
|
623
619
|
|
|
624
620
|
// Create tool-specific configs only if selected
|
|
625
|
-
if (aiTools.includes(
|
|
621
|
+
if (aiTools.includes('claude')) {
|
|
626
622
|
await createClaudeConfig(projectPath, projectName);
|
|
627
|
-
console.log(
|
|
623
|
+
console.log(' ā .claude/CLAUDE.md created');
|
|
628
624
|
}
|
|
629
625
|
|
|
630
|
-
if (aiTools.includes(
|
|
626
|
+
if (aiTools.includes('cursor')) {
|
|
631
627
|
await createCursorConfig(projectPath, projectName);
|
|
632
|
-
console.log(
|
|
628
|
+
console.log(' ā .cursorrules created');
|
|
633
629
|
}
|
|
634
630
|
|
|
635
|
-
if (aiTools.includes(
|
|
631
|
+
if (aiTools.includes('windsurf')) {
|
|
636
632
|
await createWindsurfConfig(projectPath, projectName);
|
|
637
|
-
console.log(
|
|
633
|
+
console.log(' ā .windsurfrules created');
|
|
638
634
|
}
|
|
639
635
|
|
|
640
|
-
console.log(
|
|
636
|
+
console.log('⨠AI configuration complete!\n');
|
|
641
637
|
}
|
|
642
638
|
|
|
643
639
|
module.exports = {
|