@minimalstuff/ui
v1.2.1
Published
React UI component library.
Downloads
523
Readme
@minimalstuff/ui
React UI component library.
Installation
pnpm add @minimalstuff/ui react react-domPeer dependencies: React 18 or 19.
Usage
import { Button } from '@minimalstuff/ui';
import '@minimalstuff/ui/style.css';
export function App() {
return <Button variant="primary">Click me</Button>;
}The @minimalstuff/ui/style.css import is required for styles and icons to render.
Development
pnpm install
pnpm run dev # Storybook on :6006
pnpm run lint
pnpm run test
pnpm run build # Library build → dist/Releasing
CI (lint, test, build) and npm publish run together when a GitHub Release is published.
Prerequisites
NPM token Create an automation token at npmjs.com/access-tokens (scope: package publish for
@minimalstuff/ui).Repository secret In the repo: Settings → Secrets and variables → Actions. Add a secret named
NPM_TOKENwith the token value.
Procedure
Bump version (optional if using tag-based versioning):
pnpm version 1.2.0 # or 1.2.0-alpha.0 for prerelease git push && git push --tagsCreate a GitHub Release Releases → Draft a new release:
- Choose or create a tag (e.g.
v1.2.0). Use the same version as inpackage.jsonif you bumped it; otherwise the workflow sets the package version from the tag (e.g.v1.2.0→1.2.0). - Add release notes and publish.
- Choose or create a tag (e.g.
Workflow The CI & Publish workflow runs on release published. It sets the package version from the tag, runs lint, test, build, then
pnpm publish --no-git-checks. The package is published under the taglatest(or the tag you set for prereleases).
Prereleases
Semver prereleases (e.g. 1.0.0-0, 1.0.0-alpha.1) are supported. To avoid making them the default install:
- Publish with a dist-tag, e.g.
pnpm publish --tag next, or - Rely on consumers installing an explicit version:
pnpm add @minimalstuff/[email protected].
If you want CI to publish prereleases automatically (e.g. on tag v1.0.0-alpha.1), add a separate workflow or extend the existing one to run on prerelease tags and use --tag next.
