From 88446df7248ea117494159653f783daa8f8eacbc Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Mon, 6 Apr 2020 09:32:42 +0100 Subject: [PATCH] chore: fix missed `src/` vs `lib/` documentation (#5591) Co-authored-by: Mathias Bynens --- CONTRIBUTING.md | 5 ++--- docs/api.md | 2 +- package.json | 2 +- utils/doclint/README.md | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b12adaa..1e181b18 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/docs/api.md b/docs/api.md index bcafb574..7cb55ad8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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'); diff --git a/package.json b/package.json index 4b54d737..e1659132 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/utils/doclint/README.md b/utils/doclint/README.md index 46a362d6..b3f8c366 100644 --- a/utils/doclint/README.md +++ b/utils/doclint/README.md @@ -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