gachchan
v9.2.2
Published
Shared lib (work in node and browser) for common functionalities
Downloads
162
Maintainers
Readme
gachchan: common funcs for both Serverside and Clientside
Install
npm i gachchan
Notable Dependencies
- nanoid
Peers
- lodash
- decimal.js
Sponsors
https://github.com/sponsors/lockevn
To publish/release
- change
package.jsonversion string - (Optional) run in local those commands
pnpm run ciandpnpm releaseto build the output package (to test) - Create git tag and publish the git tag
Development
TECH NOTE: How we setup Deps
This lib gachchan use _intersection from 'lodash/intersection' to import function from lodash
_intersectionwill not be bundled intogachchanby default. When you writeimport \_intersection from 'lodash/intersection', it creates a dependency that expectslodashto be available at runtime.Specify
"peerDependencies": { "lodash": "^4.17.21" } ingachchan.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 ofgachchanthat they need to installlodashDo
tts-wallet(which usegachchan) need to depend onlodash?- Yes,
tts-walletneeds to installlodashas a direct dependency because: - It's a peer dependency of
gachchanThe import statements ingachchanexpect 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
- Package manager pnpm
- Release with semantic-release
- Test with https://vitest.dev
