Firstly, this library was created to go hand in hand with the city of Ghent styleguide, so if you'd like to contribute in any way to this project, it might be of use to read the documentation to that project.
⚠️ When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
- Document your changes inline in the code using JSDoc 3. Update the README.md with details of changes to the interface.
- Write tests if you add any new functionality.
- Increase the version numbers in the
package.json
to the new version that this Pull Request would represent. The versioning scheme we use is SemVer. - You may merge the Pull Request in once you have the sign-off of at least one other developer, or if you do not have permission to do that, you may request the second reviewer to merge it for you.
- Have git flow installed on your machine.
- Have
node
andnpm
installed on your machine (most preferably the latest version). - Write access for @digipolis-gent/modal.
We use the default git flow config. If you haven't already, run the following command to initialize git flow in your repository.
git flow init -d
Before you start, make sure the changes you want to release are merged into the develop
branch.
-
Start a release branch
git flow release start [<newversion>]
-
Bump the version in package.json. You could either do this:
-
Manually: Open
package.json
and change the value for theversion
key. Do the same forpackage-lock.json
. -
In the CLI using the npm-version command.
npm --no-git-tag-version version [patch | minor | major]
-
Change the
[Unreleased]
title in changelog to the<newversion>
alongside the date. You can copy/adapt from previous versions. -
Commit your changes
git commit -m "Bump to [<newversion>]"
-
Finish your release. A new git tag will be created and the release branch will be back-merged into
develop
.git flow release finish [<newversion>]
When prompted, provide the
<newversion>
as a message for the git tag. -
Push changes to the remote
git push --follow-tags
- Open the releases page of the repository
- Click your newly created tag and choose "Edit tag" at the top-right corner.
- Use
<newversion>
as the name for your release - Copy the content the CHANGELOG that is relevant for the new version and use it as the description.
- Create downloadable archives to include with the release:
- Run
npm pack
in your CLI in the root of the repository. A.tgz
archive will be created. - Convert the
.tgz
to a.zip
archive. - Upload both archives to the release page and rename them to
modal.{zip|tgz}
.
- Publish the release
-
Login to the npm registry in your CLI
npm adduser
-
Publish the package
npm publish
-
Do a happy dance 💃