eroad-hos-rulekit

3.0.4 • 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 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.

/eroad-hos-rulekit/

    Package Sidebar

    Install

    npm i eroad-hos-rulekit

    Weekly Downloads

    1

    Version

    3.0.4

    License

    ISC

    Unpacked Size

    6.38 MB

    Total Files

    400

    Last publish

    Collaborators

    • mobiledevteam