Compare commits

...

1 Commits

Author SHA1 Message Date
Logan Markewich c016f6ac4e update contributing instructions 2025-07-07 16:54:53 -06:00
2 changed files with 52 additions and 1 deletions
+51
View File
@@ -38,6 +38,7 @@ npm install -g pnpm
```shell
pnpm install
pnpm install -g tsx
```
### Build the packages
@@ -48,6 +49,56 @@ To build all packages, run:
pnpm build
```
### Start Developing
You can launch the package in dev-mode by running:
```shell
pnpm dev
```
This will use turbo to run all packages in watch-mode. This means you can make changes and have them automatically built.
If you want to customize what packages are built/watched, you can run turbo directly and adjust the filter:
```shell
pnpm turbo run dev --filter="./packages/core" --concurrency=100
```
In another terminal, you can write and run any script needed to quickly test your changes. For example:
```typescript
import { createMemory, staticBlock } from "@llamaindex/core/memory";
// Create memory with predefined context
const memory = createMemory({
memoryBlocks: [
staticBlock({
content:
"The user is a software engineer who loves TypeScript and LlamaIndex.",
messageRole: "system",
}),
],
});
async function main() {
const result = await memory.getLLM();
console.log(result);
}
void main().catch(console.error);
```
And run it with:
```shell
pnpm exec tsx my_script.ts
```
This flow allows you to easily test your changes without having to build the entire project.
Once you are happy with your changes, be sure to add tests (and confirm existing tests are passing!).
### Run tests
#### Unit tests
+1 -1
View File
@@ -4,7 +4,7 @@
"scripts": {
"clean": "find . -type d \\( -name .turbo -o -name node_modules -o -name dist -o -name .next -o -name lib \\) -exec rm -rf {} +",
"build": "turbo run build --filter=\"./packages/*\" --filter=\"./packages/providers/**\"",
"dev": "turbo run dev --filter=\"./packages/*\" --filter=\"./packages/providers/**\"",
"dev": "turbo run dev --filter=\"./packages/*\" --filter=\"./packages/providers/**\" --concurrency=100",
"format": "prettier --ignore-unknown --cache --check .",
"format:write": "prettier --ignore-unknown --write .",
"lint": "turbo run lint",