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 linkcd ../oros # or ../hard-ai
npm link lib-kava-aiThis creates a symlink so changes to the library reflect immediately after building.
cd ../lib-kava-ai
npm run build:watchnote 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-aiIn your consumer project, you can point directly to a GitHub URL:
npm install github:Kava-Labs/lib-kava-ainpm install github:Kava-Labs/lib-kava-ai#devnpm install github:Kava-Labs/lib-kava-ai#9fdc3fanpm 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 testsUses Vitest + Testing Library.
npm run testIf publishing or committing built files:
npm run buildMake sure dist/ includes compiled files and CSS modules if needed.