Skip to content

Commit b11550d

Browse files
committed
Add README
1 parent 33cd7fe commit b11550d

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

provider/techstack/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Tech Stack File context provider for OpenCodeGraph
2+
3+
This is a context provider for [OpenCodeGraph](https://opencodegraph.org) that annotates your code with metadata such as package category and package homepage urls provided by a corresponding `techstack.yml` file.
4+
5+
## Example
6+
![OpenCodeGraph Techstack provider in action](./examples/demo.gif)
7+
8+
## Usage
9+
10+
Provide the absolute file path of the techstack yml file in the settings.
11+
```json
12+
"opencodegraph.providers": {
13+
// ... other providers ...
14+
"https://opencodegraph.org/npm/@opencodegraph/provider-techstack": {
15+
"yaml": "</full/path/to/techstack.yml>"
16+
}
17+
}
18+
```
19+
20+
## Notes
21+
22+
- The Tech Stack File provider for [OpenCodeGraph](https://opencodegraph.org) currently provides annotations for `.js(x)` and `.ts(x)` files.
23+
24+
```typescript
25+
capabilities(params: CapabilitiesParams, settings: Settings): CapabilitiesResult {
26+
// TODO: support more languages
27+
return { selector: [{ path: '**/*.js?(x)' }, { path: '**/*.ts?(x)' }] }
28+
},
29+
```
30+
31+
- Tech Stack File provider annotates packages detected in your project's `package.json` against CommonJS and ES Module import statements in your code.
25 MB
Loading

0 commit comments

Comments
 (0)