mantine-extension-template v0.2.2
Mantine Extension Template
This is a template repository for creating Mantine extensions. It includes all necessary configuration files and scripts to get you started.
Get 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 useto switch to the correct node version - Come up with a name for your extension and replace all occurrences of
mantine-extension-templatewith your extension name - Change
repositoryfield in package/package.json to point to your repository - Run
npm run docgento generate files required for documentation - To verify that everything works correctly, run
npm run buildandnpm testto build and test your initial setup - All good! Start developing your extension.
Local development
To develop your extension locally, run the following commands:
- Run
npm run storybookto start the storybook - Run
npm run devto start the documentation - To regenerate props documentation, run
npm run docgen
Publishing package
- Login with your npm account by running
npm login, if you have 2FA enabled, generate automation token and add it to your~/.npmrcfile - Make sure that your package name is unique and does not exist on npm yet
- Run
npm run release:patch,npm run release:minorornpm run release:majorto publish new version of your package
Publish documentation
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 file of your extension
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.