@cleargov/shared-ui v0.0.19
shared-ui
Generating a new component for our shared-ui library
Our shared ui library uses secondary entry points. Each new component should also have its own module. If you need to create a new secondary entry point under the shared-ui project then these are the steps to follow:
This will create a new secondary entry point as a subfolder under the shared-ui library.
npx nx generate library-secondary-entry-point --library=shared-ui --name=button
To add a new component to this entry point change to the lib folder of the new secondary entry point.
cd libs/shared-ui/forms/src/lib/
Generate your new component.
npx nx g c cg-checkbox
Verify that your new component and any new related ts files you created are exported in the index.ts file in your secondary entry points src folder. These should only be exported if you want them to be accessible by any applications that import the @cleargov/shared-ui project.
Click here for more information on why we are using secondary entry points.
Be sure you go back to your root folder prior to trying to build any project or you will receive errors in the console.