chore: update CONTRIBUTING.md

This commit is contained in:
Randolf J 2022-06-10 17:02:19 +02:00
parent 4d359906a4
commit 34144b4b07
4 changed files with 5 additions and 20 deletions

View File

@ -86,10 +86,10 @@ To run ESLint, use:
npm run lint:eslint
```
You can check your code (both JS & TS) type-checks by running:
You can check your code by running:
```bash
npm run build:tsc
npm run build
```
## TypeScript guidelines
@ -107,7 +107,7 @@ We structure these using TypeScript's project references, which lets us treat ea
### Shipping CJS and ESM bundles
Currently Puppeteer ships two bundles; a CommonJS version for Node and an ESM bundle for the browser. Therefore we maintain two `tsconfig` files for each project; `tsconfig.esm.json` and `tsconfig.cjs.json`. At build time we compile twice, once outputting to CJS and another time to output to ESM.
Currently Puppeteer ships both CommonJS and ESM, therefore we maintain two `tsconfig` files for each project: `tsconfig.esm.json` and `tsconfig.cjs.json`. At build time we compile twice, once outputting to CJS and another time to output to ESM.
We compile into the `lib` directory which is what we publish on the npm repository and it's structured like so:

View File

@ -1,9 +1,3 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "../../lib/cjs/puppeteer",
"module": "CommonJS"
},
"references": [{ "path": "../../vendor/tsconfig.cjs.json" }]
"extends": "../../src/tsconfig.cjs.json"
}

View File

@ -1,9 +1,3 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "../../lib/esm/puppeteer",
"module": "esnext"
},
"references": [{ "path": "../../vendor/tsconfig.esm.json" }]
"extends": "../../src/tsconfig.esm.json"
}

View File

@ -7,9 +7,6 @@
"extends": "./tsconfig.base.json",
"compilerOptions": {
"noEmit": true,
/* This module setting is just for VSCode so it doesn't throw error when we
use dynamic imports.
*/
"module": "esnext"
},
"include": ["src"]