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(plugins): update plugin developer docs wrt NODE_PATH #10028

Merged
merged 2 commits into from
Dec 4, 2019

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Nov 25, 2019

followup from #9997 which recommended NODE_ENV but meant to recommend NODE_PATH.

Also some error message formatting


closes #9950 #9948

`\`${moduleIdentifier}\`.
Tried to require() from these locations:
${__dirname}
${cwdPath}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

we might also spit out NODE_PATH, if it is set. L175 tries all of that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. I started this but i'm going to split into a separate PR because NODE_PATH from the node side starts to get pretty complex.

@connorjclark
Copy link
Collaborator

oops 👀

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

some nice quality improvements! 👍

docs/plugins.md Outdated
@@ -231,6 +231,8 @@ The following artifacts are available for use in the audits of Lighthouse plugin

While Lighthouse has more artifacts with information about the page than are in this list, those artifacts are considered experimental and their structure or existence could change at any time. Only use artifacts not on the list above if you are comfortable living on the bleeding edge and can tolerate unannounced breaking changes.

If you're interested in other data not mentioned here, please file an issue. We'd love to help.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
If you're interested in other data not mentioned here, please file an issue. We'd love to help.
If you're interested in other page information not mentioned here, please file an issue. We'd love to help.

maybe? data just felt a bit weird 🤷‍♂

2. Install the plugin as a (peer) dependency, parallel to `lighthouse`.
3. Run `npx -p lighthouse lighthouse https://example.com --plugins=lighthouse-plugin-example --view`
1. Install `lighthouse` (v5+) and the plugin `lighthouse-plugin-example`, likely as `devDependencies`.
* `npm install -D lighthouse lighthouse-plugin-example`
Copy link
Collaborator

Choose a reason for hiding this comment

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

TIL -D isn't just yarn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants