0.0.1 • Published 2 months ago

test-web-shared-components v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

Shared components

This project is develop using React + TypeScript + Vite + Storybook + Vanilla-extract to building custom components for internal use.

How to add new component

For add a new component use the src/lib folder and create a folder for the component. After that you should register an export in src/lib/main.ts file.

Also you need create a storie for the new component. Go to src/stories and create a new file or folder.

git clone bofaz@vs-ssh.visualstudio.com:v3/bofaz/Axos%20Marketing%20Cloud/Shared%20Components shared-components

cd shared-components

npm install

# for using storybook
npm run storybook

# for build
npm run build

# for testing in other projects
npm run build

npm link

For publishing we need to udpate the version we are using semantic versioning

Given a version number MAJOR.MINOR.PATCH, increment the:

    MAJOR version when you make incompatible API changes
    MINOR version when you add functionality in a backward compatible manner
    PATCH version when you make backward compatible bug fixes

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

we can update the version with the following commands:

# bumps the patch number like 0.0.0 -> 0.0.1
npm version patch

# bumps the patch number like 0.0.0 -> 0.1.0
npm version minor

# bumps the patch number like 0.0.0 -> 1.0.0
npm version major

How to publish new library version to npm

First update the version as previously described

npm version ...

Then you will need to login into npm to do that write:

npm login --scope@my-org