create-ng-tailwind 3.1.0 → 4.1.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.
Potentially problematic release.
This version of create-ng-tailwind might be problematic. Click here for more details.
- package/CHANGELOG.md +96 -341
- package/README.md +111 -157
- package/lib/cli/index.js +74 -3
- package/lib/cli/interactive.js +26 -1
- package/lib/managers/ProjectManager.js +2 -5
- package/lib/templates/base/components.js +243 -0
- package/lib/templates/base/index.js +207 -0
- package/lib/templates/base/infrastructure.js +314 -0
- package/lib/templates/base/linting.js +359 -0
- package/lib/templates/base/pwa.js +103 -0
- package/lib/templates/base/services.js +362 -0
- package/lib/templates/blog/app.js +250 -0
- package/lib/templates/blog/components.js +360 -0
- package/lib/templates/blog/i18n.js +77 -0
- package/lib/templates/blog/index.js +126 -0
- package/lib/templates/blog/pages.js +554 -0
- package/lib/templates/blog/services.js +390 -0
- package/lib/templates/dashboard/app.js +320 -0
- package/lib/templates/dashboard/charts.js +305 -0
- package/lib/templates/dashboard/components.js +410 -0
- package/lib/templates/dashboard/i18n.js +340 -0
- package/lib/templates/dashboard/index.js +141 -0
- package/lib/templates/dashboard/layout.js +310 -0
- package/lib/templates/dashboard/pages.js +681 -0
- package/lib/templates/ecommerce/app.js +315 -0
- package/lib/templates/ecommerce/components.js +496 -0
- package/lib/templates/ecommerce/i18n.js +389 -0
- package/lib/templates/ecommerce/index.js +152 -0
- package/lib/templates/ecommerce/layout.js +270 -0
- package/lib/templates/ecommerce/pages.js +969 -0
- package/lib/templates/ecommerce/services.js +300 -0
- package/lib/templates/index.js +12 -0
- package/lib/templates/landing/index.js +1117 -0
- package/lib/templates/portfolio/index.js +1160 -0
- package/lib/templates/saas/index.js +1371 -0
- package/lib/templates/starter/app.js +364 -0
- package/lib/templates/starter/i18n.js +856 -0
- package/lib/templates/starter/index.js +52 -4060
- package/lib/templates/starter/layout.js +852 -0
- package/lib/templates/starter/pages.js +1241 -0
- package/lib/utils/nodeCompat.js +85 -0
- package/package.json +1 -1
- package/lib/templates/starter/features.js +0 -867
- package/lib/utils/ai-config.js +0 -641
- /package/lib/templates/{starter → base}/advanced-features.js +0 -0
- /package/lib/templates/{starter → base}/seo-assets.js +0 -0
- /package/lib/templates/{starter → base}/seo-features.js +0 -0
- /package/lib/templates/{starter → base}/ui-features.js +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Node.js -> Angular CLI compatibility matrix.
|
|
2
|
+
// Ordered newest → oldest. The picker walks this list and returns the first
|
|
3
|
+
// Angular version whose engine ranges accept the current Node runtime.
|
|
4
|
+
const ANGULAR_COMPAT = [
|
|
5
|
+
{
|
|
6
|
+
version: "latest",
|
|
7
|
+
label: "Angular 22 (latest)",
|
|
8
|
+
nodeRanges: ["^22.22.3", "^24.15.0", ">=26.0.0"],
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
version: "21",
|
|
12
|
+
label: "Angular 21",
|
|
13
|
+
nodeRanges: ["^20.19.0", "^22.12.0", ">=24.0.0"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
version: "20",
|
|
17
|
+
label: "Angular 20",
|
|
18
|
+
nodeRanges: ["^20.11.1", "^22.0.0", "^24.0.0"],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
version: "19",
|
|
22
|
+
label: "Angular 19",
|
|
23
|
+
nodeRanges: ["^18.19.1", "^20.11.1", "^22.0.0"],
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
function parseVer(v) {
|
|
28
|
+
const [maj = 0, min = 0, pat = 0] = v.replace(/^v/, "").split(".").map(Number);
|
|
29
|
+
return { maj, min, pat };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function gte(a, b) {
|
|
33
|
+
if (a.maj !== b.maj) return a.maj > b.maj;
|
|
34
|
+
if (a.min !== b.min) return a.min > b.min;
|
|
35
|
+
return a.pat >= b.pat;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function matchesRange(nodeVer, range) {
|
|
39
|
+
const node = parseVer(nodeVer);
|
|
40
|
+
if (range.startsWith("^")) {
|
|
41
|
+
const target = parseVer(range.slice(1));
|
|
42
|
+
return node.maj === target.maj && gte(node, target);
|
|
43
|
+
}
|
|
44
|
+
if (range.startsWith(">=")) {
|
|
45
|
+
const target = parseVer(range.slice(2));
|
|
46
|
+
return gte(node, target);
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function satisfies(nodeVer, ranges) {
|
|
52
|
+
return ranges.some((r) => matchesRange(nodeVer, r));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function pickAngularVersion(nodeVer) {
|
|
56
|
+
for (const entry of ANGULAR_COMPAT) {
|
|
57
|
+
if (satisfies(nodeVer, entry.nodeRanges)) return entry;
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function formatRanges(entry) {
|
|
63
|
+
return entry.nodeRanges.join(" || ");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function buildIncompatMessage(nodeVer) {
|
|
67
|
+
const lines = [
|
|
68
|
+
`Node ${nodeVer} is not supported by any Angular CLI version this tool knows about.`,
|
|
69
|
+
"",
|
|
70
|
+
"Supported combinations:",
|
|
71
|
+
...ANGULAR_COMPAT.map((e) => ` • ${e.label.padEnd(22)} requires Node ${formatRanges(e)}`),
|
|
72
|
+
"",
|
|
73
|
+
"Options:",
|
|
74
|
+
" • Upgrade Node: nvm install 24 && nvm use 24 (or use Homebrew / nodejs.org)",
|
|
75
|
+
" • Or downgrade Angular explicitly via the flag: --ng-version=20",
|
|
76
|
+
];
|
|
77
|
+
return lines.join("\n");
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
module.exports = {
|
|
81
|
+
ANGULAR_COMPAT,
|
|
82
|
+
pickAngularVersion,
|
|
83
|
+
satisfies,
|
|
84
|
+
buildIncompatMessage,
|
|
85
|
+
};
|