codeforlife-package-javascript
This repo hosts Code for Life's Node.js package. This package contains all reusable frontend code, meant to be installed across CFL's various frontend services.
Installation
To install this package, do one of the following options.
Remember to replace the version number ("0.0.0") with your desired version.
Option 1: Run yarn install
command:
yarn install git+https://github.com/ocadotechnology/codeforlife-package-javascript.git#v0.0.0
Option 2: add the following to package.json
:
{
"dependencies": {
"codeforlife": "github:ocadotechnology/codeforlife-package-javascript#v0.0.0"
}
}
Making Changes
To make changes, you must:
- Branch off of main.
- Push your changes on your branch.
- Ensure the pipeline runs successfully on your branch.
- Have your changes reviewed and approved by a peer.
- Merge your branch into the
main
branch. - Manually trigger
the
Main
pipeline for themain
branch.
Installing your branch
You may wish to install and integrate your changes into a CFL frontend before it's been peer-reviewed.
Remember to replace the branch name ("my-branch") with your branch.
{
"dependencies": {
"codeforlife": "github:ocadotechnology/codeforlife-package-javascript#my-branch"
}
}
Pipeline
When pushing to any branch, the pipeline will:
- Check the code for linting errors.
- Run tests on the React components.
- Build the package.
- Save the build to the
lib
directory.
When merging to the main
branch, the pipeline will:
- Update the package version in package.json.
- Update CHANGELOG.md with latest commit messages.
- Determine the next version number from the commit messages using semantic versioning.
- Release a new version on GitHub.