Skip to content
Tobias edited this page Jan 26, 2023 · 5 revisions

Welcome to the Mintlify Components wiki!

Usage

Run yarn install @mintlify/components to install the library.

Then, add @import "@mintlify/components"; in a css file before your Tailwind imports. The import assumes you are using PostCSS in your project.

Contributing

Run Storybook locally: yarn run storybook

Test the components locally on your own site:

  1. yarn run build to build your changes locally
  2. yarn link in the library
  3. yarn link "@mintlify/components" in the project you want to use the WIP code in.

You will need to run npm run build every time you want your local changes to show up in the locally installed copy of the package.

You can run yarn unlink in the library to disconnect when you are done.

Publishing to npm

Run npm login if you aren't logged in already.

Bump the version in package.json.

Run npm run publish-package

Internal Releases

Mintlify uses the internal tag to release small changes to Mintlify sites before releasing a public version of the library.

To publish an internal release change the version in package.json to the form: 1.0.0-internal.1 where the version of the next version being released and the internal.x is the number of the internal release for that particular version. See below for how versions should be ordered if you had three public releases and two internal ones.

1.0.0 1.0.1-internal.1 1.0.1-internal.2 1.0.1 1.0.2

After updating the version number, run npm publish --tag internal. To install the latest internal package, run npm install @mintlify/components@internal.

Warning: Your internal package will be published to latest if you forget the --tag internal flag. You can re-set the latest tag by running npm dist-tags add @mintlify/[email protected] latest --otp=123456 where 1.0.0 is the version you want to set the tag back to and 123456 is your 2FA one-time password.

Clone this wiki locally