Skip to content

Commit

Permalink
đź“ť Document adding a new package (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 authored Nov 9, 2023
1 parent 2eb77b6 commit caca4d4
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 574 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ It's not a hard requirement, but please consider using an icon from [Gitmoji](ht
## Tests

If you want to run only specific tests, you can do `pnpm test -- -t "test name"`

## Adding a package

- Add the package name in [`pnpm-workspace.yaml`](pnpm-workspace.yaml)
- Add a `package.json` inspired from the other packages ([`packages/hub/package.json`](packages/hub/package.json) / [`packages/agents/package.json`](packages/agents/package.json)) in `packages/<package name>/package.json`
- Run `pnpm install` at the root
- Edit [`packages/doc-internal/package.json`](packages/doc-internal/package.json) and add the two commands in the `scripts` section:
- `prepublish-<package name>`
- `doc-<package name>`
- Add the `<package-name>-publish.yml` file in the `.github/workflows` folder, inspired from the other packages
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@vitest/browser": "^0.29.7",
"semver": "^7.5.0",
"tsup": "^6.7.0",
"ts-node": "^10.9.1",
"vitest": "^0.29.4",
"webdriverio": "^8.6.7"
}
Expand Down
7 changes: 1 addition & 6 deletions packages/doc-internal/fix-cdn-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import { readFileSync, writeFileSync } from "fs";
const hubPackage = JSON.parse(readFileSync("../hub/package.json").toString());
const inferencePackage = JSON.parse(readFileSync("../inference/package.json").toString());

for (const readme of [
"../../README.md",
"../../packages/hub/README.md",
"../../packages/inference/README.md",
"../../packages/agents/README.md",
]) {
for (const readme of ["../../README.md", "../../packages/hub/README.md", "../../packages/inference/README.md"]) {
let content = readFileSync(readme, "utf-8");

content = content.replace(
Expand Down
1 change: 0 additions & 1 deletion packages/doc-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^18.14.5",
"ts-node": "^10.9.1",
"typedoc": "^0.23.26",
"typedoc-plugin-markdown": "^3.14.0",
"typescript": "^4.9.5"
Expand Down
110 changes: 0 additions & 110 deletions packages/doc-internal/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions packages/inference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
},
"devDependencies": {
"@types/node": "18.13.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"vite": "^4.1.4"
"typescript": "^5.0.4"
},
"resolutions": {}
}
Loading

0 comments on commit caca4d4

Please sign in to comment.