@axos-web-dev/shared-components
v1.0.100-dev.71
Published
Axos shared components library for web.
Keywords
Readme
Installation
Using npm:
$ npm install @axos-web-dev/shared-componentsTo import components In Node.js:
// Import Components
import {
AlertBanner,
CallToActionBar,
DownloadTile,
ImageBillboard,
SecondaryFooter,
} from "@axos-web-dev/shared-components";
// Import Types/Interfaces
import { AlertBannerInterface } from "@axos-web-dev/shared-components/dist/AlertBanner/AlertBanner.interface";In css files:
/*** Import styles ***/
@import "@axos-web-dev/shared-components/dist/assets/AlertBanner/AlertBanner.css";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 [email protected]: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-orgLast you to publish the new version:
npm publish