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

docs(v2): document plugins and lifecycle APIs #1724

Merged
merged 7 commits into from Oct 8, 2019

Conversation

wgao19
Copy link
Contributor

@wgao19 wgao19 commented Jul 30, 2019

Motivation

Addressing #1640, refine docs to lifecycle APIs. Might combine to refine docs on advanced guides on plugins as well.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

NA

Related PRs

NA

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 30, 2019
@wgao19 wgao19 mentioned this pull request Jul 30, 2019
20 tasks
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jul 30, 2019

Deploy preview for docusaurus-2 ready!

Built with commit 8caa20a

https://deploy-preview-1724--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jul 30, 2019

Deploy preview for docusaurus-preview ready!

Built with commit 8caa20a

https://deploy-preview-1724--docusaurus-preview.netlify.com

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @wgao19! The part about the lifecycle APIs look great but I'm confused about the "Advanced Plugins" page's "Creating plugins" section.


A plugin is a module which exports a function that takes two parameters and returns an object.

We need to specify for our plugin:
Copy link
Contributor

Choose a reason for hiding this comment

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

These are not the only things a plugin is for. Only content plugins do these, the rest don't have to do so. I think saying this can be misleading for people unfamiliar to the concept of plugins.


And `options` are optionally the [second parameter when the plugins are used](/docs/using-plugins#configuring-plugins).

### Paths to watch
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why we only mention paths to watch here? Is this supposed to be a tutorial or some sort?

@yangshun
Copy link
Contributor

yangshun commented Oct 5, 2019

@wgao19 Will you follow up on the PR? Or I could take over too.

@wgao19
Copy link
Contributor Author

wgao19 commented Oct 6, 2019

Hi @yangshun yes plz help take over this. I am still pretty held up by my work stuff recently :(

@yangshun yangshun changed the title WiP docs(v2): lifecycle apis docs(v2): document plugins and lifecycle APIs Oct 8, 2019
Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

Proofread and edited, of course I approve of my own work 😄

@yangshun
Copy link
Contributor

yangshun commented Oct 8, 2019

@endiliey wanna have a go at reviewing it?

@yangshun yangshun merged commit 4ce1b58 into master Oct 8, 2019
@yangshun yangshun deleted the wgao19/docs-lifecycle-apis branch October 8, 2019 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants