@jars-labs/jars-components
v1.0.54-hotfix-2
Published
[](https://www.npmjs.com/package/@jars-labs/jars-components)
Downloads
1,204
Keywords
Readme
jars-components
jars-components is a component library designed to standardize and enhance the user interface components used in Umbrello projects. This library evolves from the previously used umbrello-ui library.
Getting Started
Follow these steps to initialize and build the project locally:
Prerequisites
- Node.js with version management via
nvmis recommended. - Yarn package manager installed.
⚠️ Important: Global Font Import Required
The jars-components library uses the DM Sans font for all typography. To ensure that the font weights (such as 400, 500, and 600) load correctly across all environments, you must import the library's global stylesheet in your application entrypoint.
This is especially important for Vite projects, as Vite does not automatically apply global CSS from dependencies, unlike environments such as Next.js.
✔️ Add this to your project's HTML index file:
<link
href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,[email protected],100..1000&display=swap"
rel="stylesheet"
/>Initialize the Project
- Use the specified Node version:
nvm use - Install the project dependencies:
yarn install - Build the project:
yarn build
Storybook
To view the components in a development environment, run the following command:
yarn storybookBuild the storybook:
yarn build-storybookStorybook Deployment
The jars-components Storybook is automatically deployed to https://storybook.umbrello.com/ on every push to the main branch.
Manual Deployment
If needed, Storybook can also be published manually by triggering the Publish Storybook GitHub Action from the repository's GitHub Actions page.
Local development
Testing changes to the library locally
with yarn link
- go to the jars-components root folder
- run
yarn link - go to the project folder that you want to test on, for example
/admin - run
yarn link @jars-labs/jars-components - run
yarnin/admin - start and test
or with yarn pack
yarn packin jars-components root- copy the location of the generated tarball
- got to the target project dependency
yarn workspace admin add file:/Users/<your_user>/e14/jars-components/jars-labs-jars-components-<version>.tgz- run
yarn - start and test
Publishing a New Version to npm
Follow these steps to publish a new version of the @jars-labs/jars-components package:
1. Ensure You Are Logged into npm
Log in to npm with your credentials:
npm loginMake sure you have the necessary permissions for the jars-labs organization.
2. Update the Version
Use Semantic Versioning:
- Patch: For bug fixes or small changes (e.g., 1.0.0 → 1.0.1).
- Minor: For new features without breaking changes (e.g., 1.0.0 → 1.1.0).
- Major: For breaking changes (e.g., 1.0.0 → 2.0.0).
npm version <patch|minor|major>3. Build the Package
yarn build4. Verify the Package Content (optional)
Test what will be included in the npm package:
npm packExtract the contents of the tarball to verify the package content.
tar -tzf jars-components-<version>.tgz5. Publish the Package
npm publish --access public6. Push the tag
git push --follow-tags