chore: update CONTRIBUTING.md
This commit is contained in:
parent
4d359906a4
commit
34144b4b07
@ -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:
|
||||
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user