@gurucore/finance v0.0.8
@gurucore/finance: common (public) financial funcs for both Serverside and Clientside
Install
run npm i @gurucore/finance
Notable Dependencies
- gachchan
- Fully TypeScript
- Use Parcel to build
Peers
- lodash
- decimal.js
Sponsors
https://github.com/sponsors/lockevn
To publish/release
- change
package.jsonversion string - (Optional) run in local those commands
npm run ciandnpm run releaseto build the output package (to test) - Create git tag and publish the git tag
Development
TECH NOTE: How we setup Deps
This lib @gurucore/finance use _intersection from 'lodash/intersection' to import function from lodash
_intersectionwill not be bundled into@gurucore/financeby default. When you writeimport \_intersection from 'lodash/intersection', it creates a dependency that expectslodashto be available at runtime.Specify
"peerDependencies": { "lodash": "^4.17.21" } in@gurucore/finance.You're using
lodashbut want to allow the consuming project to control thelodashversion It prevents multiple copies oflodashin the final application It makes it clear to users of@gurucore/financethat they need to installlodashDo
tts-wallet(which usegurucore-finance) need to depend onlodash?- Yes,
tts-walletneeds to installlodashas a direct dependency because: - It's a peer dependency of
@gurucore/financeThe import statements in@gurucore/financeexpect to findlodashinnode_modules - If
tts-walletdoesn't installlodash, you'll get runtime errors about missing modules
- Yes,
TECH NOTE: build with Parcel
- Parcel to build https://dev.to/ihaback/create-your-own-typescript-library-with-parceljs-3dh7
- Release with semantic-release
- Test with https://vitest.dev