- Install nodejs via https://nodejs.org/en/
Currently built using node v20.9.0 and NPM v10.1.0
- Clone the repo from https://github.com/SSWConsulting/SSW.Rules.Widget
- Run
npm install
to install packages - Create a
.env
file using.env.template
file and replace placeholders with the actual values. If you add new variable, then don't forget to update the.env.template
file.
- Branch off main for your PBI
- Do your work
- Run the site in development mode using
npm run dev
- Commit code and push
- Raise a PR
- Get it merged!
- In
ssw.rules.widget
runnpm link
- Go to the project you want to include the widget and run
npm link ssw.rules.widget
- Go to the project you want to include the widget into and run
yarn link <path to widget> -A
- Update the version number. Run
npm version <patch|minor|major>
- Run
npm run build
to build the widget into thedist
folder - Run
npm login
and enter the SSW account credentials (found in KeePass) to log in to NPM - Run
npm publish
to publish the build as a new version of the package
- Code Compiles
- Check the Acceptance Criteria.
- Code is squash-merged to main via a pull request that was approved by a 2nd developer.
As per rule: Done - Do you go beyond 'Done' and follow a 'Definition of Done'?
- main is the main branch
- Always create a new branch for your PBIs
- Always delete your branch once your PR has been merged (GitHub should automatically do this)