Skip to content

Commit

Permalink
Update CONTRIBUTING.md guide to mention pnpm / corepack
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinVdBroeck committed Jun 25, 2024
1 parent 9ea6395 commit 83e40f2
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Once you've cloned a Turf repository, and have a terminal open and currenty in t
- enable pnpm as a package manager. Requires Node 16+. Alternatively just `npm install -g pnpm`.
- `pnpm install`
- install dependencies and build modules
- `npm test`
- `pnpm test`
- run all tests and linters

You're now ready to contribute.
Expand Down Expand Up @@ -79,16 +79,16 @@ it will create a new folder inside `packages` with a simple boilerplate for your
tests. We prefer dynamic testing built from GeoJSON files placed in
`./test/in` that are subsequently written to `./test/out` if your `REGEN`
[environment variable is set](https://askubuntu.com/a/58828) to `true`. If
`REGEN` is set to a different value, then running `npm t` will compare the
`REGEN` is set to a different value, then running `pnpm t` will compare the
output of the tests to the files already present in `./test/out`.
* `types.ts` - A file that tests the custom TypeScript types declared in
`index.d.ts`.
* `package.json` - The [node](http://nodejs.org) metadata container file.
Modules imported in `index.js` should be listed here under `dependencies`,
and modules used in `test.js` and/or `bench.js` should be listed under
`devDependencies`. `npm install` looks to this file to install dependencies
`devDependencies`. `pnpm install` looks to this file to install dependencies
in `./node_modules`.
* `README.md` - This README is generated _automatically_ by running `npm run
* `README.md` - This README is generated _automatically_ by running `pnpm run
docs` from the project root level. **DO NOT edit this file**.
* `LICENCE` - Like the README, this file should not be edited.
* `test/` - This directory holds the GeoJSON files that provide data for
Expand Down Expand Up @@ -244,7 +244,7 @@ Run the release commands, replace `7.0.0` with your version number

- API docs for each turf package are extracted from JSDoc comments in the source code into the top-level README.md files. README's are automatically updated on commit using via the pre-commit hook.

Should you want to generate new README files manually, use `npm run docs`:
Should you want to generate new README files manually, use `pnpm run docs`:
- **inside a module:** will generate the docs for that module.
- **main folder:** will generate docs for all modules.

Expand All @@ -254,7 +254,7 @@ Should you want to generate new README files manually, use `npm run docs`:

```bash
$ cd ./turf/packages/turf-center
$ npm run docs
$ pnpm run docs

> @turf/center@5.0.4 docs /Users/mac/Github/turf/packages/turf-center
> node ../../scripts/generate-readmes
Expand All @@ -266,9 +266,9 @@ Building Docs: @turf/center

```bash
$ cd ./turf
$ npm run docs
> @5.0.0 docs /Users/mac/Github/turf
> node ./scripts/generate-readmes
$ pnpm run docs
> @ docs /Users/mac/Github/turf
> tsx ./scripts/generate-readmes

Building Docs: @turf/along
Building Docs: @turf/area
Expand All @@ -286,8 +286,9 @@ Building Docs: @turf/boolean-clockwise
The [turfjs.org](http://turfjs.org/) website is managed in a [separate repo](https://github.com/Turfjs/turf-www) with its own [contributing guide](https://github.com/Turfjs/turf-www/blob/master/CONTRIBUTING.md).

## Other Dependencies
- Turf uses [pnpm](https://pnpm.io/) and [lerna](https://lernajs.io/) during the testing, packaging and publishing process.
- Lerna and pnpm will be automatically installed when you run `npm install` in the root directory.
- Turf uses [pnpm 9](https://pnpm.io/9.x) and [lerna](https://lernajs.io/) during the testing, packaging and publishing process.
- Lerna will be automatically installed when you run `pnpm install` in the root directory.
- Pnpm will need to be installed on your computer, installers are available via the pnpm website. When using [corepack](https://nodejs.org/api/corepack.html), this is automatically installed when running `pnpm`.

## Financial contributions

Expand Down

0 comments on commit 83e40f2

Please sign in to comment.