CLI
The herbst-ui CLI copies component code into your project and points the imports to your alias. Run it with npx, no global install needed.
Init
Run it once per project.
The herbst-ui CLI copies component code into your project and points the imports to your alias. Run it with npx, no global install needed.
Run it once per project.
npx herbst-ui@latest initinit finds the application in angular.json and creates herbst.json with these options:
src/app/shared/ui.@shared/ui.It also adds the alias to tsconfig, copies theme.css and the cn utility, imports the theme in your global CSS and installs the base dependencies. To change the folder or the alias, edit herbst.json.
Add one or more components at once. If a component depends on another, the CLI brings both.
npx herbst-ui@latest add button
npx herbst-ui@latest add dialog input selectThe files go into componentsDir, with imports already using your alias. Missing npm dependencies are installed.
--overwrite: with add, replaces files that already exist.--project <name>: with init, picks the application when angular.json has more than one.--cwd <dir>: runs the command in another folder.Each component is published in a registry, with one JSON per component. add reads the registry, resolves the dependencies, rewrites the imports to your alias and writes the files into your project. Nothing stays hidden inside a package.