add opensrc
This commit is contained in:
@@ -31,3 +31,6 @@ yarn.lock
|
|||||||
# Environment
|
# Environment
|
||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
|
|
||||||
|
# opensrc - source code for packages
|
||||||
|
opensrc/
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# AGENTS.md
|
||||||
|
|
||||||
|
Instructions for AI coding agents working with this codebase.
|
||||||
|
|
||||||
|
<!-- opensrc:start -->
|
||||||
|
|
||||||
|
## Source Code Reference
|
||||||
|
|
||||||
|
Source code for dependencies is available in `opensrc/` for deeper understanding of implementation details.
|
||||||
|
|
||||||
|
See `opensrc/sources.json` for the list of available packages and their versions.
|
||||||
|
|
||||||
|
Use this source code when you need to understand how a package works internally, not just its types/interface.
|
||||||
|
|
||||||
|
### Fetching Additional Source Code
|
||||||
|
|
||||||
|
To fetch source code for a package or repository you need to understand, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx opensrc <package> # npm package (e.g., npx opensrc zod)
|
||||||
|
npx opensrc pypi:<package> # Python package (e.g., npx opensrc pypi:requests)
|
||||||
|
npx opensrc crates:<package> # Rust crate (e.g., npx opensrc crates:serde)
|
||||||
|
npx opensrc <owner>/<repo> # GitHub repo (e.g., npx opensrc vercel/ai)
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- opensrc:end -->
|
||||||
+12
-3
@@ -3,7 +3,9 @@
|
|||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"lib": ["ES2022"],
|
"lib": [
|
||||||
|
"ES2022"
|
||||||
|
],
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
@@ -14,6 +16,13 @@
|
|||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": [
|
||||||
"exclude": ["node_modules", "dist", "src/**/*.test.ts"]
|
"src/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"dist",
|
||||||
|
"src/**/*.test.ts",
|
||||||
|
"opensrc"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user