zard-cli 1.0.0-beta.98 → 1.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/README.md +92 -36
- package/commands/add/component-installer.d.ts +3 -0
- package/commands/add/component-installer.d.ts.map +1 -1
- package/commands/add/component-installer.js +10 -4
- package/commands/add/component-installer.js.map +1 -1
- package/commands/add/component-selector.d.ts +6 -0
- package/commands/add/component-selector.d.ts.map +1 -1
- package/commands/add/component-selector.js +9 -27
- package/commands/add/component-selector.js.map +1 -1
- package/commands/add/dark-mode-setup.d.ts.map +1 -1
- package/commands/add/dark-mode-setup.js +2 -11
- package/commands/add/dark-mode-setup.js.map +1 -1
- package/commands/add/dependency-resolver.d.ts +8 -1
- package/commands/add/dependency-resolver.d.ts.map +1 -1
- package/commands/add/dependency-resolver.js +87 -16
- package/commands/add/dependency-resolver.js.map +1 -1
- package/commands/add/index.d.ts.map +1 -1
- package/commands/add/index.js +128 -96
- package/commands/add/index.js.map +1 -1
- package/commands/add/stylesheet-setup.d.ts +3 -0
- package/commands/add/stylesheet-setup.d.ts.map +1 -0
- package/commands/add/stylesheet-setup.js +92 -0
- package/commands/add/stylesheet-setup.js.map +1 -0
- package/commands/add/wizard.d.ts +35 -0
- package/commands/add/wizard.d.ts.map +1 -0
- package/commands/add/wizard.js +299 -0
- package/commands/add/wizard.js.map +1 -0
- package/commands/init/config-prompter.d.ts +55 -3
- package/commands/init/config-prompter.d.ts.map +1 -1
- package/commands/init/config-prompter.js +92 -74
- package/commands/init/config-prompter.js.map +1 -1
- package/commands/init/dependencies.d.ts +1 -8
- package/commands/init/dependencies.d.ts.map +1 -1
- package/commands/init/dependencies.js +51 -25
- package/commands/init/dependencies.js.map +1 -1
- package/commands/init/index.d.ts.map +1 -1
- package/commands/init/index.js +147 -81
- package/commands/init/index.js.map +1 -1
- package/commands/init/project-kind.d.ts +82 -0
- package/commands/init/project-kind.d.ts.map +1 -0
- package/commands/init/project-kind.js +166 -0
- package/commands/init/project-kind.js.map +1 -0
- package/commands/init/steps.d.ts +15 -0
- package/commands/init/steps.d.ts.map +1 -0
- package/commands/init/steps.js +154 -0
- package/commands/init/steps.js.map +1 -0
- package/commands/init/tailwind-setup.d.ts +9 -2
- package/commands/init/tailwind-setup.d.ts.map +1 -1
- package/commands/init/tailwind-setup.js +33 -12
- package/commands/init/tailwind-setup.js.map +1 -1
- package/commands/init/tsconfig-updater.d.ts +8 -1
- package/commands/init/tsconfig-updater.d.ts.map +1 -1
- package/commands/init/tsconfig-updater.js +30 -11
- package/commands/init/tsconfig-updater.js.map +1 -1
- package/commands/init/update-angular-config.d.ts.map +1 -1
- package/commands/init/update-angular-config.js +28 -50
- package/commands/init/update-angular-config.js.map +1 -1
- package/commands/init/vite-setup.d.ts +11 -0
- package/commands/init/vite-setup.d.ts.map +1 -0
- package/commands/init/vite-setup.js +61 -0
- package/commands/init/vite-setup.js.map +1 -0
- package/commands/init/wizard.d.ts +30 -0
- package/commands/init/wizard.d.ts.map +1 -0
- package/commands/init/wizard.js +560 -0
- package/commands/init/wizard.js.map +1 -0
- package/constants/app.constants.d.ts +17 -0
- package/constants/app.constants.d.ts.map +1 -1
- package/constants/app.constants.js +39 -16
- package/constants/app.constants.js.map +1 -1
- package/core/icons/families.d.ts +38 -0
- package/core/icons/families.d.ts.map +1 -0
- package/core/icons/families.js +26 -0
- package/core/icons/families.js.map +1 -0
- package/core/icons/icon-map.d.ts +24 -0
- package/core/icons/icon-map.d.ts.map +1 -0
- package/core/icons/icon-map.js +141 -0
- package/core/icons/icon-map.js.map +1 -0
- package/core/icons/index.d.ts +107 -0
- package/core/icons/index.d.ts.map +1 -0
- package/core/icons/index.js +183 -0
- package/core/icons/index.js.map +1 -0
- package/core/registry/registry-data.d.ts.map +1 -1
- package/core/registry/registry-data.js +482 -37
- package/core/registry/registry-data.js.map +1 -1
- package/core/themes/theme-definitions.d.ts.map +1 -1
- package/core/themes/theme-definitions.js +61 -72
- package/core/themes/theme-definitions.js.map +1 -1
- package/index.js +6 -3
- package/index.js.map +1 -1
- package/package.json +6 -11
- package/ui/blocks.d.ts +71 -0
- package/ui/blocks.d.ts.map +1 -0
- package/ui/blocks.js +116 -0
- package/ui/blocks.js.map +1 -0
- package/ui/brand.d.ts +14 -0
- package/ui/brand.d.ts.map +1 -0
- package/ui/brand.js +35 -0
- package/ui/brand.js.map +1 -0
- package/ui/engine/animation/index.d.ts +38 -0
- package/ui/engine/animation/index.d.ts.map +1 -0
- package/ui/engine/animation/index.js +102 -0
- package/ui/engine/animation/index.js.map +1 -0
- package/ui/engine/ansi/index.d.ts +51 -0
- package/ui/engine/ansi/index.d.ts.map +1 -0
- package/ui/engine/ansi/index.js +116 -0
- package/ui/engine/ansi/index.js.map +1 -0
- package/ui/engine/components/index.d.ts +211 -0
- package/ui/engine/components/index.d.ts.map +1 -0
- package/ui/engine/components/index.js +109 -0
- package/ui/engine/components/index.js.map +1 -0
- package/ui/engine/cursor/index.d.ts +16 -0
- package/ui/engine/cursor/index.d.ts.map +1 -0
- package/ui/engine/cursor/index.js +40 -0
- package/ui/engine/cursor/index.js.map +1 -0
- package/ui/engine/diff/index.d.ts +26 -0
- package/ui/engine/diff/index.d.ts.map +1 -0
- package/ui/engine/diff/index.js +56 -0
- package/ui/engine/diff/index.js.map +1 -0
- package/ui/engine/events/index.d.ts +24 -0
- package/ui/engine/events/index.d.ts.map +1 -0
- package/ui/engine/events/index.js +60 -0
- package/ui/engine/events/index.js.map +1 -0
- package/ui/engine/focus/index.d.ts +25 -0
- package/ui/engine/focus/index.d.ts.map +1 -0
- package/ui/engine/focus/index.js +77 -0
- package/ui/engine/focus/index.js.map +1 -0
- package/ui/engine/frame/index.d.ts +48 -0
- package/ui/engine/frame/index.d.ts.map +1 -0
- package/ui/engine/frame/index.js +0 -0
- package/ui/engine/frame/index.js.map +1 -0
- package/ui/engine/index.d.ts +28 -0
- package/ui/engine/index.d.ts.map +1 -0
- package/ui/engine/index.js +28 -0
- package/ui/engine/index.js.map +1 -0
- package/ui/engine/input/index.d.ts +36 -0
- package/ui/engine/input/index.d.ts.map +1 -0
- package/ui/engine/input/index.js +224 -0
- package/ui/engine/input/index.js.map +1 -0
- package/ui/engine/layout/index.d.ts +42 -0
- package/ui/engine/layout/index.d.ts.map +1 -0
- package/ui/engine/layout/index.js +241 -0
- package/ui/engine/layout/index.js.map +1 -0
- package/ui/engine/renderer/index.d.ts +43 -0
- package/ui/engine/renderer/index.d.ts.map +1 -0
- package/ui/engine/renderer/index.js +619 -0
- package/ui/engine/renderer/index.js.map +1 -0
- package/ui/engine/scheduler/index.d.ts +22 -0
- package/ui/engine/scheduler/index.d.ts.map +1 -0
- package/ui/engine/scheduler/index.js +77 -0
- package/ui/engine/scheduler/index.js.map +1 -0
- package/ui/engine/screen/index.d.ts +39 -0
- package/ui/engine/screen/index.d.ts.map +1 -0
- package/ui/engine/screen/index.js +255 -0
- package/ui/engine/screen/index.js.map +1 -0
- package/ui/engine/terminal/index.d.ts +84 -0
- package/ui/engine/terminal/index.d.ts.map +1 -0
- package/ui/engine/terminal/index.js +235 -0
- package/ui/engine/terminal/index.js.map +1 -0
- package/ui/engine/testing/index.d.ts +27 -0
- package/ui/engine/testing/index.d.ts.map +1 -0
- package/ui/engine/testing/index.js +63 -0
- package/ui/engine/testing/index.js.map +1 -0
- package/ui/engine/theme/index.d.ts +26 -0
- package/ui/engine/theme/index.d.ts.map +1 -0
- package/ui/engine/theme/index.js +128 -0
- package/ui/engine/theme/index.js.map +1 -0
- package/ui/engine/utils/index.d.ts +12 -0
- package/ui/engine/utils/index.d.ts.map +1 -0
- package/ui/engine/utils/index.js +143 -0
- package/ui/engine/utils/index.js.map +1 -0
- package/ui/gate.d.ts +19 -0
- package/ui/gate.d.ts.map +1 -0
- package/ui/gate.js +36 -0
- package/ui/gate.js.map +1 -0
- package/ui/index.d.ts +18 -0
- package/ui/index.d.ts.map +1 -0
- package/ui/index.js +18 -0
- package/ui/index.js.map +1 -0
- package/ui/log-sink.d.ts +24 -0
- package/ui/log-sink.d.ts.map +1 -0
- package/ui/log-sink.js +35 -0
- package/ui/log-sink.js.map +1 -0
- package/ui/output.d.ts +14 -0
- package/ui/output.d.ts.map +1 -0
- package/ui/output.js +28 -0
- package/ui/output.js.map +1 -0
- package/ui/report.d.ts +30 -0
- package/ui/report.d.ts.map +1 -0
- package/ui/report.js +45 -0
- package/ui/report.js.map +1 -0
- package/ui/runner.d.ts +66 -0
- package/ui/runner.d.ts.map +1 -0
- package/ui/runner.js +135 -0
- package/ui/runner.js.map +1 -0
- package/ui/style.d.ts +24 -0
- package/ui/style.d.ts.map +1 -0
- package/ui/style.js +44 -0
- package/ui/style.js.map +1 -0
- package/ui/testing/fake-tty.d.ts +26 -0
- package/ui/testing/fake-tty.d.ts.map +1 -0
- package/ui/testing/fake-tty.js +61 -0
- package/ui/testing/fake-tty.js.map +1 -0
- package/ui/text-input.d.ts +31 -0
- package/ui/text-input.d.ts.map +1 -0
- package/ui/text-input.js +89 -0
- package/ui/text-input.js.map +1 -0
- package/ui/theme.d.ts +10 -0
- package/ui/theme.d.ts.map +1 -0
- package/ui/theme.js +20 -0
- package/ui/theme.js.map +1 -0
- package/utils/angular-compat.d.ts +21 -0
- package/utils/angular-compat.d.ts.map +1 -0
- package/utils/angular-compat.js +52 -0
- package/utils/angular-compat.js.map +1 -0
- package/utils/config.d.ts +29 -0
- package/utils/config.d.ts.map +1 -1
- package/utils/config.js +50 -4
- package/utils/config.js.map +1 -1
- package/utils/errors.d.ts +11 -0
- package/utils/errors.d.ts.map +1 -1
- package/utils/errors.js +14 -0
- package/utils/errors.js.map +1 -1
- package/utils/get-project-info.d.ts +29 -0
- package/utils/get-project-info.d.ts.map +1 -1
- package/utils/get-project-info.js +176 -1
- package/utils/get-project-info.js.map +1 -1
- package/utils/http-client.d.ts.map +1 -1
- package/utils/http-client.js +18 -3
- package/utils/http-client.js.map +1 -1
- package/utils/icon-catalog.d.ts +34 -0
- package/utils/icon-catalog.d.ts.map +1 -0
- package/utils/icon-catalog.js +63 -0
- package/utils/icon-catalog.js.map +1 -0
- package/utils/logger.d.ts +13 -1
- package/utils/logger.d.ts.map +1 -1
- package/utils/logger.js +95 -15
- package/utils/logger.js.map +1 -1
- package/utils/package-manager.d.ts +42 -1
- package/utils/package-manager.d.ts.map +1 -1
- package/utils/package-manager.js +204 -11
- package/utils/package-manager.js.map +1 -1
- package/utils/registry.d.ts +84 -2
- package/utils/registry.d.ts.map +1 -1
- package/utils/registry.js +121 -18
- package/utils/registry.js.map +1 -1
- package/utils/schema-version.d.ts +21 -0
- package/utils/schema-version.d.ts.map +1 -0
- package/utils/schema-version.js +28 -0
- package/utils/schema-version.js.map +1 -0
- package/utils/source-file.d.ts +40 -0
- package/utils/source-file.d.ts.map +1 -0
- package/utils/source-file.js +104 -0
- package/utils/source-file.js.map +1 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which kind of project `init` is configuring.
|
|
3
|
+
*
|
|
4
|
+
* The user answers, in the wizard's first question — the CLI does not decide for
|
|
5
|
+
* them. What the workspace reveals comes afterwards, to fill in the suggested
|
|
6
|
+
* paths for the chosen type; detection only becomes a decision on the headless
|
|
7
|
+
* path, where there is nobody to ask.
|
|
8
|
+
*
|
|
9
|
+
* The differences between the types are not cosmetic: a library has no
|
|
10
|
+
* `app.config.ts` to register providers in and no pre-existing global CSS, Nx
|
|
11
|
+
* keeps the TypeScript paths in a different file, and Analog swaps Angular's
|
|
12
|
+
* build for Vite — and with it the way Tailwind is configured. Concentrating
|
|
13
|
+
* those differences here keeps every step from rediscovering them.
|
|
14
|
+
*/
|
|
15
|
+
import * as path from 'node:path';
|
|
16
|
+
/**
|
|
17
|
+
* The colour of each ecosystem in the menu.
|
|
18
|
+
*
|
|
19
|
+
* Angular stays the base white — it is the default case, and giving it a colour
|
|
20
|
+
* would suggest it is a special option among the others.
|
|
21
|
+
*/
|
|
22
|
+
const ANGULAR = '#fafafa';
|
|
23
|
+
const NX = '#6aa9ff';
|
|
24
|
+
const ANALOG = '#fb7185';
|
|
25
|
+
/**
|
|
26
|
+
* Menu order: each ecosystem with the application before the library, from the
|
|
27
|
+
* most common to the rarest. Angular opens the list because it is the default.
|
|
28
|
+
*/
|
|
29
|
+
export const PROJECT_KINDS = [
|
|
30
|
+
{
|
|
31
|
+
value: 'angular',
|
|
32
|
+
label: 'Angular',
|
|
33
|
+
detail: 'Application — providers in app.config.ts, tokens in the global CSS.',
|
|
34
|
+
color: ANGULAR,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: 'angular-library',
|
|
38
|
+
label: 'Angular Library',
|
|
39
|
+
detail: 'Publishable library — components ship with it, no app providers.',
|
|
40
|
+
color: ANGULAR,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: 'nx',
|
|
44
|
+
label: 'Nx',
|
|
45
|
+
detail: 'Application inside an Nx workspace — paths go to tsconfig.base.json.',
|
|
46
|
+
color: NX,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
value: 'nx-library',
|
|
50
|
+
label: 'Nx Library',
|
|
51
|
+
detail: 'Library inside an Nx workspace — lives in libs/, no app providers.',
|
|
52
|
+
color: NX,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
value: 'analog',
|
|
56
|
+
label: 'Analog.js',
|
|
57
|
+
detail: 'Vite-powered Angular app — Tailwind is a Vite plugin, not PostCSS.',
|
|
58
|
+
color: ANALOG,
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
const TRAITS = {
|
|
62
|
+
angular: { isLibrary: false, workspace: 'angular', bundler: 'angular', fallbackRoot: '' },
|
|
63
|
+
analog: { isLibrary: false, workspace: 'angular', bundler: 'vite', fallbackRoot: '' },
|
|
64
|
+
nx: { isLibrary: false, workspace: 'nx', bundler: 'angular', fallbackRoot: 'apps/app' },
|
|
65
|
+
'angular-library': { isLibrary: true, workspace: 'angular', bundler: 'angular', fallbackRoot: 'projects/ui' },
|
|
66
|
+
'nx-library': { isLibrary: true, workspace: 'nx', bundler: 'angular', fallbackRoot: 'libs/ui' },
|
|
67
|
+
};
|
|
68
|
+
export function isLibraryKind(kind) {
|
|
69
|
+
return TRAITS[kind].isLibrary;
|
|
70
|
+
}
|
|
71
|
+
/** Where the TypeScript paths have to be written for the project to see them. */
|
|
72
|
+
export function tsconfigFileFor(kind, projectInfo) {
|
|
73
|
+
// Nx extends a tsconfig.base.json at the root; writing into the tsconfig.json
|
|
74
|
+
// there would reach no project at all. Outside Nx the tsconfig.json itself is
|
|
75
|
+
// the target, unless the workspace already keeps a base — then that one wins.
|
|
76
|
+
if (TRAITS[kind].workspace === 'nx')
|
|
77
|
+
return 'tsconfig.base.json';
|
|
78
|
+
return projectInfo.tsconfigFile;
|
|
79
|
+
}
|
|
80
|
+
/** Se o Tailwind entra pelo PostCSS do Angular ou pelo plugin do Vite. */
|
|
81
|
+
export function bundlerFor(kind) {
|
|
82
|
+
return TRAITS[kind].bundler;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The workspace projects that can receive the install.
|
|
86
|
+
*
|
|
87
|
+
* Once the type is chosen, only what matches it makes sense to offer: asking
|
|
88
|
+
* someone who chose "library" to install into an application would offer a
|
|
89
|
+
* target the following steps do not know how to configure.
|
|
90
|
+
*/
|
|
91
|
+
export function candidateProjects(kind, projectInfo) {
|
|
92
|
+
const wanted = TRAITS[kind].isLibrary ? 'library' : 'application';
|
|
93
|
+
return projectInfo.projects.filter(project => project.projectType === wanted);
|
|
94
|
+
}
|
|
95
|
+
/** Default root when the workspace declares no compatible project. */
|
|
96
|
+
export function fallbackRootFor(kind) {
|
|
97
|
+
return TRAITS[kind].fallbackRoot;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The type the headless path assumes.
|
|
101
|
+
*
|
|
102
|
+
* With no interactive terminal nobody answers the first question, so here — and
|
|
103
|
+
* only here — the workspace decides: the manager gives the world (Nx or
|
|
104
|
+
* Angular), Analog announces itself through its own dependencies, and the
|
|
105
|
+
* absence of any application is what suggests the target is a library.
|
|
106
|
+
*/
|
|
107
|
+
export function detectProjectKind(projectInfo) {
|
|
108
|
+
const hasApplication = projectInfo.projects.some(project => project.projectType === 'application');
|
|
109
|
+
const hasLibrary = projectInfo.projects.some(project => project.projectType === 'library');
|
|
110
|
+
const isLibraryWorkspace = !hasApplication && hasLibrary;
|
|
111
|
+
if (projectInfo.hasNx)
|
|
112
|
+
return isLibraryWorkspace ? 'nx-library' : 'nx';
|
|
113
|
+
if (isLibraryWorkspace)
|
|
114
|
+
return 'angular-library';
|
|
115
|
+
return projectInfo.hasAnalog ? 'analog' : 'angular';
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Where a library's code lives.
|
|
119
|
+
*
|
|
120
|
+
* `src/lib` is the convention for both `ng generate library` and
|
|
121
|
+
* `nx g @nx/angular:library`: `src/` holds the public entry point, and
|
|
122
|
+
* everything it exports sits in `src/lib`.
|
|
123
|
+
*/
|
|
124
|
+
export function libraryBaseUrl(libraryRoot) {
|
|
125
|
+
return `${trimSlashes(libraryRoot)}/src/lib`;
|
|
126
|
+
}
|
|
127
|
+
/** The theme CSS the library starts exposing to whoever consumes it. */
|
|
128
|
+
export function libraryStylesPath(libraryRoot) {
|
|
129
|
+
return `${trimSlashes(libraryRoot)}/src/styles.css`;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The project root, derived from `baseUrl`.
|
|
133
|
+
*
|
|
134
|
+
* Both layouts end two levels below the root — `<root>/src/app` in an
|
|
135
|
+
* application, `<root>/src/lib` in a library — so going up two levels gives the
|
|
136
|
+
* directory holding that project's `project.json`, `ng-package.json` and
|
|
137
|
+
* `.postcssrc.json`. A single app at the root gives `.`.
|
|
138
|
+
*/
|
|
139
|
+
export function projectRootOf(baseUrl) {
|
|
140
|
+
return path.posix.normalize(path.posix.join(toPosix(baseUrl), '..', '..'));
|
|
141
|
+
}
|
|
142
|
+
/** The project's source directory — where `index.html` and `main.ts` sit. */
|
|
143
|
+
export function sourceRootOf(baseUrl) {
|
|
144
|
+
return path.posix.dirname(toPosix(baseUrl));
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Where to look for the project's `index.html`.
|
|
148
|
+
*
|
|
149
|
+
* In Analog it is Vite's entry page and sits at the project root, not in `src/`
|
|
150
|
+
* as in the Angular build — suggesting the wrong path made `add dark-mode` fail
|
|
151
|
+
* right after asking.
|
|
152
|
+
*/
|
|
153
|
+
export function indexHtmlFor(kind, baseUrl) {
|
|
154
|
+
if (kind === 'analog') {
|
|
155
|
+
const root = projectRootOf(baseUrl);
|
|
156
|
+
return root === '.' ? 'index.html' : `${root}/index.html`;
|
|
157
|
+
}
|
|
158
|
+
return `${sourceRootOf(baseUrl)}/index.html`;
|
|
159
|
+
}
|
|
160
|
+
function toPosix(value) {
|
|
161
|
+
return value.replace(/\\/g, '/');
|
|
162
|
+
}
|
|
163
|
+
function trimSlashes(value) {
|
|
164
|
+
return value.replace(/\/+$/, '');
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=project-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-kind.js","sourceRoot":"","sources":["../../../src/commands/init/project-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAYlC;;;;;GAKG;AACH,MAAM,OAAO,GAAG,SAAS,CAAC;AAC1B,MAAM,EAAE,GAAG,SAAS,CAAC;AACrB,MAAM,MAAM,GAAG,SAAS,CAAC;AAEzB;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC;IACzD;QACE,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,qEAAqE;QAC7E,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,kEAAkE;QAC1E,KA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,0 +1,15 @@
|
|
|
1
|
+
import { type Config } from '../../utils/config.js';
|
|
2
|
+
import { type ProjectInfo } from '../../utils/get-project-info.js';
|
|
3
|
+
/**
|
|
4
|
+
* One step of initialization: the label the UI shows and the work it does.
|
|
5
|
+
*
|
|
6
|
+
* The list is built once and consumed by both the wizard and the headless path,
|
|
7
|
+
* so the two run exactly the same sequence — the UI only decides how to present it.
|
|
8
|
+
*/
|
|
9
|
+
export interface InitStep {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly note: string;
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildInitSteps(cwd: string, config: Config, projectInfo: ProjectInfo, isReInitializing: boolean): InitStep[];
|
|
15
|
+
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/commands/init/steps.ts"],"names":[],"mappings":"AAQA,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAOlE;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,OAAO,GACxB,QAAQ,EAAE,CA6DZ"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { installComponent } from '../../commands/add/component-installer.js';
|
|
2
|
+
import { installDependencies } from '../../commands/init/dependencies.js';
|
|
3
|
+
import { bundlerFor, isLibraryKind, projectRootOf, tsconfigFileFor } from '../../commands/init/project-kind.js';
|
|
4
|
+
import { applyThemeToStyles, createPostCssConfig } from '../../commands/init/tailwind-setup.js';
|
|
5
|
+
import { updateTsConfig } from '../../commands/init/tsconfig-updater.js';
|
|
6
|
+
import { updateAngularConfig } from '../../commands/init/update-angular-config.js';
|
|
7
|
+
import { setupVitePlugin } from '../../commands/init/vite-setup.js';
|
|
8
|
+
import { iconFamily } from '../../core/icons/index.js';
|
|
9
|
+
import { resolveConfigPaths } from '../../utils/config.js';
|
|
10
|
+
import { iconCatalog } from '../../utils/icon-catalog.js';
|
|
11
|
+
import { logger } from '../../utils/logger.js';
|
|
12
|
+
import { existsSync } from 'node:fs';
|
|
13
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
14
|
+
import * as path from 'node:path';
|
|
15
|
+
export function buildInitSteps(cwd, config, projectInfo, isReInitializing) {
|
|
16
|
+
const kind = config.projectType;
|
|
17
|
+
const isLibrary = isLibraryKind(kind);
|
|
18
|
+
const projectRoot = projectRootOf(config.baseUrl);
|
|
19
|
+
const tsconfigFile = tsconfigFileFor(kind, projectInfo);
|
|
20
|
+
const steps = [
|
|
21
|
+
{
|
|
22
|
+
label: 'components.json',
|
|
23
|
+
note: 'component & utils aliases',
|
|
24
|
+
run: async () => {
|
|
25
|
+
await writeFile(path.resolve(cwd, 'components.json'), JSON.stringify(config, null, 2), 'utf8');
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: 'dependencies',
|
|
30
|
+
note: `CDK, CVA, tailwind-merge, ng-icons (${iconFamily(config.icons, iconCatalog())?.label ?? config.icons})`,
|
|
31
|
+
run: () => installDependencies(cwd, config, projectInfo),
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
// Application providers do not belong to the library: the app consuming it
|
|
35
|
+
// registers them, and a library has no app.config.ts to write into.
|
|
36
|
+
if (!isLibrary) {
|
|
37
|
+
steps.push({
|
|
38
|
+
label: config.appConfigFile,
|
|
39
|
+
note: 'zard/ui providers',
|
|
40
|
+
run: () => updateAngularConfig(cwd, config),
|
|
41
|
+
});
|
|
42
|
+
steps.push(tailwindPipelineStep(cwd, projectRoot, kind, projectInfo, isReInitializing));
|
|
43
|
+
}
|
|
44
|
+
steps.push({
|
|
45
|
+
label: config.tailwind.css,
|
|
46
|
+
note: `theme tokens (${config.tailwind.baseColor})`,
|
|
47
|
+
run: () => applyThemeToStyles(cwd, config),
|
|
48
|
+
});
|
|
49
|
+
if (isLibrary) {
|
|
50
|
+
steps.push({
|
|
51
|
+
label: 'ng-package.json',
|
|
52
|
+
note: 'ship the theme with the library',
|
|
53
|
+
run: () => registerStylesAsset(cwd, config),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
steps.push({
|
|
57
|
+
label: tsconfigFile,
|
|
58
|
+
note: 'import path aliases',
|
|
59
|
+
run: () => updateTsConfig(cwd, config, tsconfigFile),
|
|
60
|
+
}, {
|
|
61
|
+
label: 'core & utils',
|
|
62
|
+
note: 'shared helpers used by every component',
|
|
63
|
+
run: () => installCoreDependencies(cwd, config),
|
|
64
|
+
});
|
|
65
|
+
return steps;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* How Tailwind enters the application build.
|
|
69
|
+
*
|
|
70
|
+
* In Analog it is Vite that compiles, and Tailwind is one of its plugins — a
|
|
71
|
+
* `.postcssrc.json` there would be read by nobody. Everywhere else the Angular
|
|
72
|
+
* build loads PostCSS, and the file goes to the project root: in a workspace
|
|
73
|
+
* with several apps, writing it at the repository root would configure all of
|
|
74
|
+
* them at once.
|
|
75
|
+
*/
|
|
76
|
+
function tailwindPipelineStep(cwd, projectRoot, kind, projectInfo, isReInitializing) {
|
|
77
|
+
if (bundlerFor(kind) === 'vite') {
|
|
78
|
+
return {
|
|
79
|
+
label: 'vite.config.ts',
|
|
80
|
+
note: 'Tailwind Vite plugin',
|
|
81
|
+
run: () => setupVitePlugin(cwd),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const relative = projectRoot === '.' ? '.postcssrc.json' : `${projectRoot}/.postcssrc.json`;
|
|
85
|
+
return {
|
|
86
|
+
label: relative,
|
|
87
|
+
note: 'Tailwind PostCSS plugin',
|
|
88
|
+
// Re-initializing rewrites the file on purpose: it is the chance to correct a
|
|
89
|
+
// `.postcssrc.json` left over from an earlier setup.
|
|
90
|
+
run: () => !projectInfo.hasTailwind || isReInitializing || !existsSync(path.resolve(cwd, relative))
|
|
91
|
+
? createPostCssConfig(cwd, projectRoot)
|
|
92
|
+
: Promise.resolve(),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Declares the theme CSS as a library asset.
|
|
97
|
+
*
|
|
98
|
+
* ng-packagr only publishes what the entry point reaches; a loose `.css` in
|
|
99
|
+
* `src/` stays out of the package. Without this entry, the file the previous
|
|
100
|
+
* step wrote would exist only in the repository and never reach whoever
|
|
101
|
+
* installs the library.
|
|
102
|
+
*
|
|
103
|
+
* The asset is declared with `output: '/'` so it lands at the package root.
|
|
104
|
+
* Listing it as a plain path preserves the source folder, and the consumer would
|
|
105
|
+
* end up importing `<lib>/src/styles.css` — a `src/` that is a detail of the
|
|
106
|
+
* library's repository, not something whoever installs it should know.
|
|
107
|
+
*/
|
|
108
|
+
async function registerStylesAsset(cwd, config) {
|
|
109
|
+
const libraryRoot = path.resolve(cwd, projectRootOf(config.baseUrl));
|
|
110
|
+
const ngPackagePath = path.join(libraryRoot, 'ng-package.json');
|
|
111
|
+
if (!existsSync(ngPackagePath)) {
|
|
112
|
+
// An Nx library only gets an ng-package.json when it is publishable; in the
|
|
113
|
+
// others there is no package to assemble and the CSS is consumed straight
|
|
114
|
+
// from the source.
|
|
115
|
+
logger.warn(`ng-package.json not found in ${path.relative(cwd, libraryRoot)}; skipping the theme asset.`);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const relative = path.relative(libraryRoot, path.resolve(cwd, config.tailwind.css)).split(path.sep).join('/');
|
|
119
|
+
const input = path.posix.dirname(relative);
|
|
120
|
+
const glob = path.posix.basename(relative);
|
|
121
|
+
const entry = { glob, input, output: '/' };
|
|
122
|
+
const ngPackage = JSON.parse(await readFile(ngPackagePath, 'utf8'));
|
|
123
|
+
const assets = Array.isArray(ngPackage.assets) ? ngPackage.assets : [];
|
|
124
|
+
// Old entries pointing at the same file are replaced, not accumulated: a
|
|
125
|
+
// repeated init would otherwise publish the CSS twice, in two places.
|
|
126
|
+
const others = assets.filter(asset => !describesSameFile(asset, relative, entry));
|
|
127
|
+
const alreadyCorrect = assets.length === others.length + 1 && hasEntry(assets, entry);
|
|
128
|
+
if (alreadyCorrect)
|
|
129
|
+
return;
|
|
130
|
+
ngPackage.assets = [...others, entry];
|
|
131
|
+
await writeFile(ngPackagePath, `${JSON.stringify(ngPackage, null, 2)}\n`, 'utf8');
|
|
132
|
+
}
|
|
133
|
+
/** Whether an already-declared asset publishes exactly the same file. */
|
|
134
|
+
function describesSameFile(asset, relative, entry) {
|
|
135
|
+
if (typeof asset === 'string')
|
|
136
|
+
return asset.replace(/^\.\//, '') === relative;
|
|
137
|
+
const declared = asset;
|
|
138
|
+
return declared?.glob === entry.glob && declared?.input === entry.input;
|
|
139
|
+
}
|
|
140
|
+
function hasEntry(assets, entry) {
|
|
141
|
+
return assets.some(asset => typeof asset === 'object' &&
|
|
142
|
+
asset !== null &&
|
|
143
|
+
asset.glob === entry.glob &&
|
|
144
|
+
asset.input === entry.input &&
|
|
145
|
+
asset.output === entry.output);
|
|
146
|
+
}
|
|
147
|
+
async function installCoreDependencies(cwd, config) {
|
|
148
|
+
const resolvedConfig = await resolveConfigPaths(cwd, config);
|
|
149
|
+
await mkdir(resolvedConfig.resolvedPaths.core, { recursive: true });
|
|
150
|
+
await mkdir(resolvedConfig.resolvedPaths.utils, { recursive: true });
|
|
151
|
+
await installComponent('core', resolvedConfig.resolvedPaths.core, resolvedConfig);
|
|
152
|
+
await installComponent('utils', resolvedConfig.resolvedPaths.utils, resolvedConfig);
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=steps.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C7D,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,uBAAuB,CAAC,GAAW,EAAE,MAAc;IAChE,MAAM,cAAc,GAAG,MAAM,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAE7D,MAAM,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpE,MAAM,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAErE,MAAM,gBAAgB,CAAC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAClF,MAAM,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { type Config } from '../../utils/config.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Writes `.postcssrc.json` at the root of the project that will use it.
|
|
4
|
+
*
|
|
5
|
+
* The Angular build looks for the file starting from the CSS it is processing
|
|
6
|
+
* and walks up to the workspace root, so the project is the most specific place
|
|
7
|
+
* that works — and in a monorepo with several apps it is the only one that does
|
|
8
|
+
* not configure all of them at once. `projectRoot` is `.` for a single app.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createPostCssConfig(cwd: string, projectRoot?: string): Promise<void>;
|
|
4
11
|
export declare function applyThemeToStyles(cwd: string, config: Config): Promise<void>;
|
|
5
12
|
//# sourceMappingURL=tailwind-setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-setup.d.ts","sourceRoot":"","sources":["../../../src/commands/init/tailwind-setup.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tailwind-setup.d.ts","sourceRoot":"","sources":["../../../src/commands/init/tailwind-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAYvE;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,SAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKvF;AAqBD,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQnF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { resolveAliasToPath } from '../../utils/config.js';
|
|
1
2
|
import { getThemeContent } from '../../utils/theme-selector.js';
|
|
2
|
-
import { writeFile } from 'node:fs/promises';
|
|
3
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
3
4
|
import * as path from 'path';
|
|
4
5
|
const POSTCSS_CONFIG = `{
|
|
5
6
|
"plugins": {
|
|
@@ -7,21 +8,41 @@ const POSTCSS_CONFIG = `{
|
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
`;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Writes `.postcssrc.json` at the root of the project that will use it.
|
|
13
|
+
*
|
|
14
|
+
* The Angular build looks for the file starting from the CSS it is processing
|
|
15
|
+
* and walks up to the workspace root, so the project is the most specific place
|
|
16
|
+
* that works — and in a monorepo with several apps it is the only one that does
|
|
17
|
+
* not configure all of them at once. `projectRoot` is `.` for a single app.
|
|
18
|
+
*/
|
|
19
|
+
export async function createPostCssConfig(cwd, projectRoot = '.') {
|
|
20
|
+
const targetDir = path.resolve(cwd, projectRoot);
|
|
21
|
+
await mkdir(targetDir, { recursive: true });
|
|
22
|
+
await writeFile(path.join(targetDir, '.postcssrc.json'), POSTCSS_CONFIG, 'utf8');
|
|
13
23
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The CSS `@import` is resolved by the bundler relative to the file containing
|
|
26
|
+
* it, so it has to be a real relative path — it cannot be assembled by slicing
|
|
27
|
+
* the alias.
|
|
28
|
+
*
|
|
29
|
+
* The previous version took the second segment of baseUrl and pasted the alias
|
|
30
|
+
* without its first character. It only worked for the `src/app` + `@/...`
|
|
31
|
+
* layout: with baseUrl `projects/admin/src/app` it aimed at `./admin/...`, and
|
|
32
|
+
* with an `@app/core` alias it produced `./appapp/core`.
|
|
33
|
+
*/
|
|
34
|
+
function coreImportPath(cwd, config) {
|
|
35
|
+
const cssDir = path.dirname(path.resolve(cwd, config.tailwind.css));
|
|
36
|
+
const coreDir = path.resolve(cwd, resolveAliasToPath(config.aliases.core, config.baseUrl));
|
|
37
|
+
const relative = path.relative(cssDir, coreDir).split(path.sep).join('/');
|
|
38
|
+
return relative.startsWith('.') ? relative : `./${relative}`;
|
|
17
39
|
}
|
|
18
40
|
export async function applyThemeToStyles(cwd, config) {
|
|
19
41
|
const stylesPath = path.join(cwd, config.tailwind.css);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const themeContent = getThemeContent(selectedTheme, corePath);
|
|
42
|
+
const themeContent = getThemeContent(config.tailwind.baseColor, coreImportPath(cwd, config));
|
|
43
|
+
// In a library that file usually does not exist — init creates it, so the
|
|
44
|
+
// library can expose the tokens to whoever consumes it.
|
|
45
|
+
await mkdir(path.dirname(stylesPath), { recursive: true });
|
|
25
46
|
await writeFile(stylesPath, themeContent, 'utf8');
|
|
26
47
|
}
|
|
27
48
|
//# sourceMappingURL=tailwind-setup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-setup.js","sourceRoot":"","sources":["../../../src/commands/init/tailwind-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tailwind-setup.js","sourceRoot":"","sources":["../../../src/commands/init/tailwind-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAe,M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AAC,KAAK,UAAU,kBAAkB,CAAC,GAAW,EAAE,MAAc;IAClE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACvD,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7F,0EAA0E;IAC1E,wDAAwD;IACxD,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,SAAS,CAAC,UAAU,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { type Config } from '../../utils/config.js';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Writes the alias into the tsconfig the projects actually extend.
|
|
4
|
+
*
|
|
5
|
+
* In an Nx workspace that is `tsconfig.base.json`: the root `tsconfig.json` is
|
|
6
|
+
* inherited by no project, and a mapping written there would never reach the
|
|
7
|
+
* compiler — the alias resolved in the editor and broke in the build.
|
|
8
|
+
*/
|
|
9
|
+
export declare function updateTsConfig(cwd: string, config: Config, tsconfigFile?: string): Promise<void>;
|
|
3
10
|
//# sourceMappingURL=tsconfig-updater.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig-updater.d.ts","sourceRoot":"","sources":["../../../src/commands/init/tsconfig-updater.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tsconfig-updater.d.ts","sourceRoot":"","sources":["../../../src/commands/init/tsconfig-updater.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAOjE;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,SAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/G"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { aliasPattern } from '../../utils/config.js';
|
|
1
2
|
import { logger } from '../../utils/logger.js';
|
|
2
3
|
import * as commentJson from 'comment-json';
|
|
3
4
|
import { existsSync } from 'fs';
|
|
4
5
|
import { writeFile, readFile } from 'node:fs/promises';
|
|
5
6
|
import * as path from 'path';
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Writes the alias into the tsconfig the projects actually extend.
|
|
9
|
+
*
|
|
10
|
+
* In an Nx workspace that is `tsconfig.base.json`: the root `tsconfig.json` is
|
|
11
|
+
* inherited by no project, and a mapping written there would never reach the
|
|
12
|
+
* compiler — the alias resolved in the editor and broke in the build.
|
|
13
|
+
*/
|
|
14
|
+
export async function updateTsConfig(cwd, config, tsconfigFile = 'tsconfig.json') {
|
|
15
|
+
const tsconfigPath = path.join(cwd, tsconfigFile);
|
|
8
16
|
if (!existsSync(tsconfigPath)) {
|
|
9
|
-
logger.warn(
|
|
17
|
+
logger.warn(`${tsconfigFile} not found, skipping path configuration`);
|
|
10
18
|
return;
|
|
11
19
|
}
|
|
12
20
|
try {
|
|
@@ -15,7 +23,7 @@ export async function updateTsConfig(cwd, config) {
|
|
|
15
23
|
await writeTsConfig(tsconfigPath, updatedTsConfig);
|
|
16
24
|
}
|
|
17
25
|
catch (error) {
|
|
18
|
-
logger.warn(
|
|
26
|
+
logger.warn(`Failed to update ${tsconfigFile} paths`);
|
|
19
27
|
logger.error(error);
|
|
20
28
|
}
|
|
21
29
|
}
|
|
@@ -27,21 +35,32 @@ function updatePaths(tsconfig, config) {
|
|
|
27
35
|
if (!tsconfig.compilerOptions) {
|
|
28
36
|
tsconfig.compilerOptions = {};
|
|
29
37
|
}
|
|
30
|
-
if (!tsconfig.compilerOptions.baseUrl) {
|
|
31
|
-
tsconfig.compilerOptions.baseUrl = './';
|
|
32
|
-
}
|
|
33
38
|
if (!tsconfig.compilerOptions.paths) {
|
|
34
39
|
tsconfig.compilerOptions.paths = {};
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
// The key comes from the chosen alias, not from a fixed `@/*`: someone who
|
|
42
|
+
// configured `@app/components` generates imports with that prefix, and mapping
|
|
43
|
+
// a different one would leave every import in the project unresolved.
|
|
39
44
|
tsconfig.compilerOptions.paths = {
|
|
40
45
|
...tsconfig.compilerOptions.paths,
|
|
41
|
-
|
|
46
|
+
[aliasPattern(config.aliases.components)]: [`${pathMappingBase(tsconfig, config)}/*`],
|
|
42
47
|
};
|
|
43
48
|
return tsconfig;
|
|
44
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Writes the mapping without introducing `baseUrl`.
|
|
52
|
+
*
|
|
53
|
+
* Declaring `baseUrl` breaks the build on TypeScript 6 — the option became an
|
|
54
|
+
* error and disappears in 7 — and since 4.1 it is no longer necessary: without
|
|
55
|
+
* it, paths are resolved relative to the tsconfig itself. Projects that already
|
|
56
|
+
* declare the option are still honoured, with the mapping written relative to it.
|
|
57
|
+
*/
|
|
58
|
+
function pathMappingBase(tsconfig, config) {
|
|
59
|
+
const baseUrl = tsconfig.compilerOptions.baseUrl;
|
|
60
|
+
if (!baseUrl)
|
|
61
|
+
return `./${config.baseUrl}`;
|
|
62
|
+
return path.posix.relative(path.posix.normalize(baseUrl), path.posix.normalize(config.baseUrl)) || '.';
|
|
63
|
+
}
|
|
45
64
|
async function writeTsConfig(tsconfigPath, tsconfig) {
|
|
46
65
|
const updatedContent = commentJson.stringify(tsconfig, null, 2);
|
|
47
66
|
await writeFile(tsconfigPath, updatedContent, 'utf8');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig-updater.js","sourceRoot":"","sources":["../../../src/commands/init/tsconfig-updater.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"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1 @@
|
|
|
1
|
-
{"version":3,"file":"update-angular-config.d.ts","sourceRoot":"","sources":["../../../src/commands/init/update-angular-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"update-angular-config.d.ts","sourceRoot":"","sources":["../../../src/commands/init/update-angular-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AA4BnD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCpF"}
|