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(parser): Improving parser hooks documentation #2790

Merged
merged 15 commits into from
Mar 16, 2019

Conversation

misterdev
Copy link
Contributor

I'm working on improving the current documentation for the parser (link), this is a work in progress and I've opened this PR to have some feedback.

  1. I'm debugging how the parser works, so I may misunderstand the purpose of some hooks, feedbacks are appreciated

  2. In statement hook I'm listing all the types of the statements you can receive as callback parameter, I think it can be useful, but it is 36 rows long, is it ok to put it there?

  3. Since this page only shows a list of all the Parser Hooks, I would like to rename it "Parser Hooks" to be coherent to "Compiler Hooks" and "Compilation Hooks", is it a good idea?
    screenshot 2019-01-30 at 17 21 04

Thanks

@montogeek montogeek added the API label Jan 31, 2019
@misterdev misterdev changed the title [WIP] docs(parser): Improving parser hooks documentation docs(parser): Improving parser hooks documentation Feb 10, 2019
@misterdev
Copy link
Contributor Author

I've differentiated between:

  • Hook Parameters: identifier e.g. hooks.assigned.for('identifier')
  • Callback Parameters: expression e.g. .tap('MyPlugin', expression => {});

This page only shows a list of parser hooks so I renamed it "Parser Hooks" to be coherent to "Compiler Hooks" and "Compilation Hooks".
screenshot 2019-01-30 at 17 21 04

Since this is what I've learned debugging the parser hooks I really appreciate every feedback.
This is ready for review.

@montogeek :)

webpack.config.js Outdated Show resolved Hide resolved
@misterdev
Copy link
Contributor Author

misterdev commented Mar 1, 2019

I've updated this branch, it is ready for review

Copy link
Member

@EugeneHlushko EugeneHlushko left a comment

Choose a reason for hiding this comment

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

Very great addition, but i have added some comments to be addressed or discussed

src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
src/content/api/parser.md Outdated Show resolved Hide resolved
@misterdev
Copy link
Contributor Author

Thanks @EugeneHlushko for reviewing! I've included your changes and made some more improvements following your suggestion

Copy link
Member

@EugeneHlushko EugeneHlushko left a comment

Choose a reason for hiding this comment

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

It took some effort but i think it looks good :)

@EugeneHlushko
Copy link
Member

@montogeek mind taking a look at this too?

@misterdev
Copy link
Contributor Author

Friendly ping :) @montogeek

@EugeneHlushko
Copy link
Member

Double checked it again, looks good and seems doesn't get any more attention. Merging

@EugeneHlushko EugeneHlushko merged commit 6e06219 into webpack:master Mar 16, 2019
@EugeneHlushko
Copy link
Member

Thanks!

@misterdev misterdev deleted the misterdev-parser-hooks branch March 18, 2019 00:52
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