moph-package
v0.0.2
Published
This repository contains the publishable `@moph/ui` component library and its documentation app.
Downloads
21
Readme
MOPH UI
This repository contains the publishable @moph/ui component library and its documentation app.
Install
Install the library and its peer dependencies in a consumer application:
npm install @moph/ui react react-domUse components
Components are available through granular subpath exports:
import { Button } from "@moph/ui/button";
import "@moph/ui/globals.css";The package is published as one npm package while allowing consumers to install one dependency and import only the component entrypoints they use.
Local development
Run the showcase app from the repository root:
npm run dev --workspace webThe app maps @moph/ui imports to packages/ui/src, so component edits appear on localhost without rebuilding the package.
Publish
Build and publish from the package directory:
cd packages/ui
npm publish --access publicprepublishOnly builds dist automatically before npm uploads the package. Update the version before publishing a new release:
npm version patch
npm publish --access public