This is a template repository for creating Mantine extensions. It includes all necessary configuration files and scripts to get you started.
- Click "Use this template" button at the top of the page to create a new repository based on this template.
- Clone the repository to your local machine and install dependencies (
yarn
) - Run
nvm use
to switch to the correct node version - Come up with a name for your extension and replace all occurrences of
mantine-extension-template
with your extension name - Change
repository
field in package/package.json to point to your repository - Run
npm run docgen
to generate files required for documentation - To verify that everything works correctly, run
npm run build
andnpm test
to build and test your initial setup - All good! Start developing your extension.
To develop your extension locally, run the following commands:
- Run
npm run storybook
to start the storybook - Run
npm run dev
to start the documentation - To regenerate props documentation, run
npm run docgen
- Login with your npm account by running
npm login
, if you have 2FA enabled, generate automation token and add it to your~/.npmrc
file - Make sure that your package name is unique and does not exist on npm yet
- Run
npm run release:patch
,npm run release:minor
ornpm run release:major
to publish new version of your package
By default, the documentation is deployed to GitHub Pages. The script to deploy documentation runs automatically when the package is published. In order for
this script to work correctly, you need to make sure that repository
field in package/package.json points to your repository.
To publish documentation manually, run npm run docs:deploy
.
README.md
file at the root repository directory (file that you are currently reading) is copied to to package/README.md
during the build process to avoid duplication. To add content to the README file of your extension, remove extension template documentation from this file and add your own content.