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

Naming conventions for plugins #4827

Closed
shannonbux opened this issue Apr 3, 2018 · 5 comments
Closed

Naming conventions for plugins #4827

shannonbux opened this issue Apr 3, 2018 · 5 comments
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation

Comments

@shannonbux
Copy link
Contributor

Description

Currently, the Plugin Authoring doc describes four categories in the Gatsby plugin/package naming convention. This covers most existing plugins. However, there is potential to add packages and plugins that must adhere to other naming conventions.

Problem

Here's an example scenario: if we add eslint to Gatsby and want to share it through the plugin library, we'll need to name it according to eslint.org's conventions: eslint-plugin-<plugin-name>. The plugin library would currently not pull this into search results, so we'd need to expand how the library finds packages and plugins.

Additional Questions

  • What kinds of things fit into the plugin library beyond what is currently outlined in the Plugin Authoring doc?

@kkemple

@shannonbux
Copy link
Contributor Author

Sort of related to issue #4671 because as we expand what categories of plugins are included in the library, the naming conventions for plugins will likely need to change.

@KyleAMathews
Copy link
Contributor

We actually filter which NPM packages show up in the library using NPM "keywords" not the names of the packages so a package named eslint-preset-gatsby would show up if it added the right keyword.

The two keywords we match on (currently) are gatsby-plugin and gatsby-component. I've thought about adding gatsby-library to this list in the past as that'd be a perfect fit for something like eslint-preset-gatsby.

We specify these keywords in two places:

@shannonbux
Copy link
Contributor Author

ok @KyleAMathews cool! Should I add those links to our Plugin Authoring doc?

@KyleAMathews
Copy link
Contributor

Perhaps not the links to the code as that's likely to change and not interesting to most people but definitely which keywords people should use. Add the two to the keywords bullet here

We should perhaps have a section near the top making it very clear how they get their plugin to show up in the plugin library.

@m-allanson m-allanson added type: documentation An issue or pull request for improving or updating Gatsby's documentation and removed UX Design labels Apr 13, 2018
@KyleAMathews
Copy link
Contributor

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

No branches or pull requests

3 participants