/** * Which kind of project `init` is configuring. * * The user answers, in the wizard's first question — the CLI does not decide for * them. What the workspace reveals comes afterwards, to fill in the suggested * paths for the chosen type; detection only becomes a decision on the headless * path, where there is nobody to ask. * * The differences between the types are not cosmetic: a library has no * `app.config.ts` to register providers in and no pre-existing global CSS, Nx * keeps the TypeScript paths in a different file, and Analog swaps Angular's * build for Vite — and with it the way Tailwind is configured. Concentrating * those differences here keeps every step from rediscovering them. */ import type { ProjectInfo, WorkspaceProject } from '../../utils/get-project-info.js'; export type ProjectKind = 'angular' | 'angular-library' | 'nx' | 'nx-library' | 'analog'; export interface ProjectKindOption { readonly value: ProjectKind; readonly label: string; readonly detail: string; /** The ecosystem's colour, so the menu says at a glance which world the type belongs to. */ readonly color: string; } /** * Menu order: each ecosystem with the application before the library, from the * most common to the rarest. Angular opens the list because it is the default. */ export declare const PROJECT_KINDS: readonly ProjectKindOption[]; export declare function isLibraryKind(kind: ProjectKind): boolean; /** Where the TypeScript paths have to be written for the project to see them. */ export declare function tsconfigFileFor(kind: ProjectKind, projectInfo: ProjectInfo): string; /** Se o Tailwind entra pelo PostCSS do Angular ou pelo plugin do Vite. */ export declare function bundlerFor(kind: ProjectKind): 'angular' | 'vite'; /** * The workspace projects that can receive the install. * * Once the type is chosen, only what matches it makes sense to offer: asking * someone who chose "library" to install into an application would offer a * target the following steps do not know how to configure. */ export declare function candidateProjects(kind: ProjectKind, projectInfo: ProjectInfo): WorkspaceProject[]; /** Default root when the workspace declares no compatible project. */ export declare function fallbackRootFor(kind: ProjectKind): string; /** * The type the headless path assumes. * * With no interactive terminal nobody answers the first question, so here — and * only here — the workspace decides: the manager gives the world (Nx or * Angular), Analog announces itself through its own dependencies, and the * absence of any application is what suggests the target is a library. */ export declare function detectProjectKind(projectInfo: ProjectInfo): ProjectKind; /** * Where a library's code lives. * * `src/lib` is the convention for both `ng generate library` and * `nx g @nx/angular:library`: `src/` holds the public entry point, and * everything it exports sits in `src/lib`. */ export declare function libraryBaseUrl(libraryRoot: string): string; /** The theme CSS the library starts exposing to whoever consumes it. */ export declare function libraryStylesPath(libraryRoot: string): string; /** * The project root, derived from `baseUrl`. * * Both layouts end two levels below the root — `/src/app` in an * application, `/src/lib` in a library — so going up two levels gives the * directory holding that project's `project.json`, `ng-package.json` and * `.postcssrc.json`. A single app at the root gives `.`. */ export declare function projectRootOf(baseUrl: string): string; /** The project's source directory — where `index.html` and `main.ts` sit. */ export declare function sourceRootOf(baseUrl: string): string; /** * Where to look for the project's `index.html`. * * In Analog it is Vite's entry page and sits at the project root, not in `src/` * as in the Angular build — suggesting the wrong path made `add dark-mode` fail * right after asking. */ export declare function indexHtmlFor(kind: ProjectKind, baseUrl: string): string; //# sourceMappingURL=project-kind.d.ts.map