Skip to content

Commit 7587fb2

Browse files
authored
More adding package docs tweaks (#2257)
## Checklist - [-] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [-] I have not broken the cheatsheet
1 parent 9e9d874 commit 7587fb2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/contributing/adding-a-new-package.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ Replace `foo` with your new package name in the instructions below.
55
1. `cd packages`
66
2. `mkdir foo && cd foo`
77
3. `pnpm init`
8-
4. `code package.json` and update the `description` field
8+
4. `code package.json` and update the `description` field. If your package is
9+
not a library (ie it's an entrypoint), add a `"private": true,` line to your
10+
`package.json`.
911
5. `pnpm install`
1012
6. `pnpm -w fix:meta`
11-
7. If your package is not a library (ie it's an entrypoint), add a `"private": true,` line to your `package.json`, then run another `pnpm -w fix:meta` for good measure.
13+
14+
If your package is not a library, you get a bit less scaffolding for free, so
15+
you may want to steal some of the scripts, as well as possibly the `main`,
16+
`types`, and `exports` fields, from one of our library's `package.json`s. The
17+
`@cursorless/common` package is a decent one to steal from.
1218

1319
For any packages that you need to depend on, you can run
1420

0 commit comments

Comments
 (0)