Thank you so much for contributing to @govtechsg/sgds. Please read this guideline before starting your development works.
To contribute, please start off at the Issue section of our github repository.
- Checkout our Issue section to search for similar bugs/issues/feature request that you encounter. Someone else might have already raised a similar issue.
- If your issue is not found, open an issue !
- Follow the instructions of the issue request form and answer them
- Describe your bug / new feature request as detailed as possible. For new feature request, let us know your motivation behind your proposal and how you intend to build the feature. For bug fixes, let us know how you intend to fix the bug.
- A SGDS admin will pick up on the discussion and notify you if the proposal is accepted
- Once accepted, you can fork the repository and start working away !
- Raise a PR, tagging the issue number, and request a review from one of our admins.
-
Check that your ruby version in use is the same as
/portal/.ruby-version
file
# rbenv
(cd portal && rbenv local)
# rvm
(cd portal && rvm use)
- In root, run
nvm use
npm install
This will install packages for root and ./lib/sgds, ./portal folders.
- Start live-reloading Jekyll + Webpack development server. When using portal, it is likely that you will need a live reload of any code changes in
lib
folder. This is all handled by the command below
In root, run
$ npm run portal:dev # Access from localhost:4000
Stylings are written in scss only. To make changes to sgds stylings, edit files in <rootDir>/lib/sgds/sass
.
Portal changes goes into /portal folder
This is a commitizen friendly repo. Adhere to the commit conventions of cz.
- Use default branch
- Change all references in documentation from previous version to new version, e.g. inside the
_config.yml
andreadme.md
files. - Update and tag new version using npm.
Library publication is performed in workflow by github actions. When ready for publishing, perform the following steps
-
run
cd lib/sgds
to navigate to the sgds library folder -
run
npm version <major|minor|patch>
or for alpha releasesnpm version <version-name>
**version number should observe SEMVER
**this step will auto-generate a git tag on your local
-
git push
the changes
-
run
cz changelog
to update CHANGELOG.md file (ensure that you have set up cz-cli globally)**
cz changelog
updates based on your local git tags -
Push the changes
-
run
git tag
to check the newly generated git tag on local -
git push origin <newly-created-tag>
** this triggers gh action workflow to publish the library to npm
- Manually create a release on github