Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] chore: Introduce API Extractor and start generating documentation #5967

Merged
merged 10 commits into from
Jun 4, 2020

Conversation

jackfranklin
Copy link
Collaborator

@jackfranklin jackfranklin commented Jun 3, 2020

This PR introduces API Extractor to the codebase and generates new Markdown documentation into the new-doc folder. This documentation is incomplete and not meant to be used!

This PR doesn't include the documentation in the new-doc folder in order to make this PR reviewable. If this lands, I will follow it up with another PR that generates the docs.

Once this PR lands we can start slowly documenting our code (by converting the api.md docs into TSDoc comments) and once we think the new docs are ready we can make them the primary documentation and remove the old documentation.

@mathiasbynens we could exclude new-docs from Git for now, but I think it's useful to see them rendered in pull requests when we begin work on improving them so I've left them in for now. LMK what you think.

@@ -22,7 +22,7 @@ import Protocol from './protocol';
import { Connection } from './Connection';
import { Page } from './Page';
import { ChildProcess } from 'child_process';
import type { Viewport } from './PuppeteerViewport';
import { Viewport } from './PuppeteerViewport';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Extractor doesn't work fully with import type yet so we should use regular imports. This isn't really an issue for us anyway.

customQueryHandlers,
getQueryHandlerAndSelector,
clearQueryHandlers,
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't need these as well as the ESM exports

"module": "CommonJS"
"module": "CommonJS",
"declaration": true,
"declarationMap": true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Extractor works off the .d.ts files so we need to generate them now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Copy link
Member

@mathiasbynens mathiasbynens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and checking in new-docs seems fine.

@jackfranklin jackfranklin merged commit 0032420 into master Jun 4, 2020
@jackfranklin jackfranklin deleted the api-extractor branch June 4, 2020 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants