cb-sting-dls
v1.2.3
Published
Public React package for the Sting design system
Readme
CB Sting DLS
CB Sting DLS is a public React package for the Sting design system.
This repository is publish-only. Source code, tests, and the production build live in a separate local DLS source repository. This package repository only keeps npm metadata and the built dist folder that is published to npm.
Install
npm install cb-sting-dlsInstall the required peer dependencies if they are not already present in your app:
npm install react react-domUsage
Import components from the package root and load the design system stylesheet once in your app shell.
import { SButton } from "cb-sting-dls";
import "cb-sting-dls/sting-react.css";
export function Example() {
return <SButton>Save</SButton>;
}Sync The Build
Build the source package first:
cd ../cb-react-dls
pnpm --filter @chargebee/sting-tokens build
pnpm --filter sting-react buildThen sync the built files into this publish-only repo:
cd ../cb-sting-dls
npm run sync:distIf the DLS source repo is not at ../cb-react-dls/packages/sting-react/dist, pass the built folder explicitly:
DLS_DIST_PATH=/absolute/path/to/cb-react-dls/packages/sting-react/dist npm run sync:distThe sync step requires these files to exist:
dist/index.jsdist/index.d.tsdist/sting-react.css
Publish
Preview the package contents before publishing:
npm pack --dry-runPublish to npm. Unscoped npm packages are public by default:
npm publishUse npm version patch, npm version minor, or npm version major before publishing a new release.
