Skip to content

Commit

Permalink
chore: fix missed src/ vs lib/ documentation (#5591)
Browse files Browse the repository at this point in the history
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
  • Loading branch information
jackfranklin and mathiasbynens committed Apr 6, 2020
1 parent b3b0dc5 commit 88446df
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -259,9 +259,8 @@ Releasing to npm consists of the following phases:
1. On your local machine, pull from [upstream](https://github.com/puppeteer/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 `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. 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. 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.
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Expand Up @@ -483,7 +483,7 @@ The default flags that Chromium will be launched with.
- returns: <[Object]>

Returns a list of devices to be used with [`page.emulate(options)`](#pageemulateoptions). Actual list of
devices can be found in [lib/DeviceDescriptors.js](https://github.com/puppeteer/puppeteer/blob/master/src/DeviceDescriptors.js).
devices can be found in [src/DeviceDescriptors.js](https://github.com/puppeteer/puppeteer/blob/master/src/DeviceDescriptors.js).

```js
const puppeteer = require('puppeteer');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
"coverage": "cross-env COVERAGE=true npm run unit",
"tsc": "tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/",
"apply-next-version": "node utils/apply_next_version.js",
"bundle": "npx browserify -r ./index.js:puppeteer -o utils/browser/puppeteer-web.js",
"bundle": "npm run tsc && npx browserify -r ./index.js:puppeteer -o utils/browser/puppeteer-web.js",
"test-types": "node utils/doclint/generate_types && tsc --version && tsc -p utils/doclint/generate_types/test/",
"unit-bundle": "node utils/browser/test.js",
"update-protocol-d-ts": "node utils/protocol-types-generator"
Expand Down
1 change: 1 addition & 0 deletions utils/doclint/README.md
Expand Up @@ -6,6 +6,7 @@ Puppeteer's source code.
Doclint works in a few steps:

1. Read sources in `lib/` folder, parse AST trees and extract public API
- note that we run DocLint on the outputted JavaScript in `lib/` rather than the source code in `src/`. We will do this until we have migrated `src/` to be exclusively TypeScript and then we can update DocLint to support TypeScript.
2. Read sources in `docs/` folder, render markdown to HTML, use puppeteer to traverse the HTML
and extract described API
3. Compare one API to another
Expand Down

0 comments on commit 88446df

Please sign in to comment.