Closed marcjulian closed 1 week ago
@goetzrobin where should I add those dependencies? I think here https://github.com/goetzrobin/spartan/blob/main/libs/cli/src/generators/ui/generator.ts the deps for Icon and button is added. Should it be added here or in another place? Is there a place to describe each deps for one component?
Something like this:
export const primitiveDeps: Record<string, string[]> = {
...
select: ['icon', 'forms', 'form-field'],
};
@marcjulian I feel like we should use a similar approach as the addIconForDependentPrimitive
function just for consistency or if you'd like to refactor to a map like you have in your comment I am cool with that, too!
Please provide the environment you discovered this bug in.
Use
npx nx g @spartan-ng/cli:ui select
to add Select component to your NX project.It should install all required dependencies. #320 added dependencies for
@spartan-ng/ui-forms-brain
and@spartan-ng/ui-form-field-brain
.Which area/package is the issue in?
select
Description
When adding Select component with the CLI (NX/Angular) the dependencies to
@spartan-ng/ui-forms-brain
and@spartan-ng/ui-form-field-brain
should be installed. Maybe they should also be mentioned on the component page.Currently the deps must be installed manually
Please provide the exception or error you saw
No response
Other information
No response
I would be willing to submit a PR to fix this issue