A highly opinionated template for getting started with developing a component/branding library, with minimal configuration on your part.
CHANGELOG.md creation derived from commit-messages.Create an instance of the template by pressing the green Use this template button on the top of this page.
Clone the repository you created to your local machine
Press the green Code button on the top of your repository page, and copy the HTTPS link.
Alternatively, you can use SSH, but you will need to set up SSH-keys on your machine.
Run git clone [YOUR_REPO_LINK] in your terminal.
Install pnpm by running npm install -g pnpm
Install dependencies with pnpm install
Run the dev-server with pnpm story:dev
Now you can start developing your library.
Go to your Github repository > Settings > Secrets > New repository secret. It's name should be NPM_ACCESS_TOKEN and should have your NPM token as its value.
If you are unsure how to create a NPM token, follow this guide.
You can update the registry you wanna publish to in the
.github/npm-publish.ymlfile. This template is set up to publish to the NPM-registry by default.
Under the name property in package.json, replace [NPM_ACCOUNT_NAME] with your npm account-name, and [NPM_PACKAGE_NAME] with your library name. (Also remove the brackets)
Under the repository property in package.json, replace [GITHUB_USERNAME] with your Github username, and [GITHUB_REPOSITORY_NAME] with the name of your Github repository. (Also remove the brackets)
Setup CI as described above.
Create a new branch for your release.
Make your changes.
When commiting your changes, be sure to format your commit-message according to Conventional Commits. This is needed for semantic-release to be able to create a new release.
For example, if you are adding a new feature, your commit-message should be
feat: [my new cool feature]
Alternatively, you can use a CLI wizard like commitizen to help you format your commit-messages.
Push your changes to Github.
Create a pull-request to merge your changes into the master branch.
Once you have merged your changes into the master branch, a new release will be created automatically, once the pipeline has finished running.
browserlist - Configures target browsers for CSS-transpilation. You can use this site to help configure a list of browsers you want to support.