fix(types): publish protocol types to npm (#5174)
Co-Authored-By: Mathias Bynens <mathias@qiwi.be>
This commit is contained in:
parent
fd43f9c23a
commit
d17708ba1f
@ -8,8 +8,8 @@ node6
|
||||
test
|
||||
utils/node6-transform
|
||||
|
||||
# exclude internal type definition files
|
||||
/lib/*.d.ts
|
||||
# exclude internal type definitions
|
||||
/lib/externs.d.ts
|
||||
|
||||
# repeats from .gitignore
|
||||
node_modules
|
||||
|
@ -252,8 +252,9 @@ Releasing to npm consists of the following phases:
|
||||
1. On your local machine, pull from [upstream](https://github.com/GoogleChrome/puppeteer) and make sure the last commit is the one just merged.
|
||||
2. Run `git status` and make sure there are no untracked files.
|
||||
- **WHY**: this is to avoid adding unnecessary files to the npm package.
|
||||
3. Run [`npx pkgfiles`](https://www.npmjs.com/package/pkgfiles) to make sure you don't publish anything unnecessary.
|
||||
4. Run `npm publish`. This publishes the `puppeteer` package.
|
||||
3. Run `npm install` to make sure the latest `lib/protocol.d.ts` is generated.
|
||||
4. Run [`npx pkgfiles`](https://www.npmjs.com/package/pkgfiles) to make sure you don't publish anything unnecessary.
|
||||
5. Run `npm publish`. This publishes the `puppeteer` package.
|
||||
3. Publish `puppeteer-core` to npm.
|
||||
1. Run `./utils/prepare_puppeteer_core.js`. The script changes the name inside `package.json` to `puppeteer-core`.
|
||||
2. Run `npm publish`. This publishes the `puppeteer-core` package.
|
||||
|
@ -69,8 +69,8 @@ declare global {
|
||||
}
|
||||
}
|
||||
}
|
||||
// empty export to keep file a module
|
||||
export {}
|
||||
|
||||
export default Protocol;
|
||||
`;
|
||||
const outputPath = path.join(__dirname, '..', '..', 'lib', 'protocol.d.ts');
|
||||
require('fs').writeFileSync(outputPath, output);
|
||||
|
Loading…
Reference in New Issue
Block a user