eroad-hos-rulekit

3.0.11 • Public • Published

eroad-hos-rulekit

The single source of truth for any Hours of Service calculation

Configuration

while we are using ts-lint and node 20 you will need to force save dev a handful of dependencies

nvm use 20.14.0
npm install 
npm run compile

Development

To make any configuration changes to american ruleset, follow the steps below:

  • Create a ruleset config in file rulesets-config.ts
  • Add the ruleset in index.ts class
  • Ensure hos features are not conflicting between ruleset config class and Ruleset class (TODO be done using script)
  • Run npm run buildDevice
  • Have the pull request or screenshot of config reviewed by PO or PM

Do this every time the ruleset configuration/code change to get the latest rulesets. Increase the memory to build the ruleset for US.

npm run build exclude-us -s
npm --max-old-space-size=4096 run build us

every time the code change you'll need to recompile your typescript into javascript. Use Webstorm or the command line:

npm run compile

Pull requests

Before Pull request run:

npm run lint
npm run lint -- --fix (if you want to fix the linting issues automatically)
npm run compile
npm run test

Creating a new ruleset

Please refer to this PR to how you can add a new ruleset. The ruleset id is generated manually from any id generator.

Readme

Keywords

none

Package Sidebar

Install

npm i eroad-hos-rulekit

Weekly Downloads

8

Version

3.0.11

License

ISC

Unpacked Size

6.41 MB

Total Files

403

Last publish

Collaborators

  • mobiledevteam