Reusable UI components & utils for AI based projects.
Use this to work on lib-kava-ai
and a consumer project (like oros
or hard-ai
) at the same time.
cd ../lib-kava-ai
npm link
cd ../oros # or ../hard-ai
npm link lib-kava-ai
This creates a symlink so changes to the library reflect immediately after building.
cd ../lib-kava-ai
npm run build:watch
note that watch command will not delete code that is removed from dist, it will also not add css files if those change or get added, running npm run build
manually is required.
When you're done with local dev:
cd ../oros # or ../hard-ai
npm unlink lib-kava-ai && npm install github:Kava-Labs/lib-kava-ai
In your consumer project, you can point directly to a GitHub URL:
npm install github:Kava-Labs/lib-kava-ai
npm install github:Kava-Labs/lib-kava-ai#dev
npm install github:Kava-Labs/lib-kava-ai#9fdc3fa
npm install github:Kava-Labs/lib-kava-ai#v0.2.1
Task | Command |
---|---|
Local dev with live changes | npm link in lib, then in consumer |
Switch back to prod source | npm unlink && npm install github:Kava-Labs/lib-kava-ai |
Use specific commit in prod | npm install github:Kava-Labs/lib-kava-ai#commit |
npm install # install deps
npm run build # build package
npm run build:watch # auto rebuild on change
npm run test # run unit tests
Uses Vitest + Testing Library.
npm run test
If publishing or committing built files:
npm run build
Make sure dist/
includes compiled files and CSS modules if needed.