-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Gatsby Plugin CLI #10294
Gatsby Plugin CLI #10294
Conversation
I'm going to break the API extension for configuring a plugin into a separate PR and will link when I open that PR. Reason being is I think it's functionality can go beyond this CLI extension. It could theoretically also be added to starters and themes. Then it could be triggered when any of things are installed. @jlengstorf I'm starting to wonder if this api needs to be it's own RFC...Thoughts? The code is available here: https://github.com/gatsbyjs/gatsby/tree/config-api |
@moonmeister it seems to me that you can build it out for this use case, but make sure it's extendable for others. No need to solve all the problems at once. 😄 |
@moonmeister any chance you could pick this one up again? We would be ok to go forward with add & remove in this PR 👍 |
@wardpeet yeah, I've been thinking about it lately. Happy to finish it. Can you give me some feedback on the code as is? Add/remove are implemented in this currently. They probably need some finishing touches though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure on how to move forward with this PR. I love the idea but just installing a plugin with npm/yarn isn't a super big improvement on developer experience.. It would be cool to add it to gatsby-config.js aswell but I have no idea on how to do that on a consistent manner as gatsby-config can have so many forms.
@wardpeet @DSchau where we at on this. Related config API work is moving forward in other PRs. Given our conversation about breaking up large projects it seems reasonable to merge this partial one. I will say the code probably needs a little more work and I may have some changes to merge in from my configapi branch that can happen now. Thoughts? |
b9f9f09
to
876749c
Compare
@sidharthachatterjee Okay, updated the code from my other branch and rebased. I still need to figure out the Yarn vs NPM using the new "standard" way. Are there docs or a PR you can point me to get me on my way? |
Hey Alex! First of all--just wanted to convey how much we appreciate this PR and our appreciation of the excellent work you've done thus far. We think the work you've done will be foundational in our future work to make doing "Gatsby things" more automated and easier--and we see this type of work as crucial in making Gatsby more friendly and more accessible to developers of all skill levels. This is something we care about deeply, and we love that you've been working on making certain Gatsby actions easier to do and automated. That being said--I don't think we want to merge this in its current state. Why? The PR is clearly foundational, and sets the stage for more impactful and valuable work in the future. For instance, it sets up the ability to do something like From this basis, let's close this PR out as it's not in a mergeable state currently--which is every bit our fault for not giving more direction before and as you began the implementation of the PR. Again -- we appreciate your work here more than you know; thanks for sticking around and being diligent about keeping this up to date! I fully anticipate we'll revisit this type of work in the future, and we'd love your assistance, insight, and expertise when we do so. We'll be in touch! |
Hey @DSchau Symfony had something called Flex
Those are configuration recipes that got added via a post-script once you add you package I added a comment since this issue and link appeared on a recent conversation on discord |
See: gatsbyjs/rfcs#13 for discussion of feature and implementation details.
UI Tasks:
On completion of config log new config to console and wait for confirmation before writingImplementation Tasks:
"search " commandextend gatsby API with 'onConfigPlugin' to add config to gatsby-config.js in progress: @moonmeister see: https://github.com/gatsbyjs/gatsby/tree/config-api"config <plugin..>" commandadd hooks for "add" to config added plugins"remove" remove config from gatsby-configauto search into add/remove/configTesting Tasks:
Docs/Community Tasks:
Document API ChangesUpdate plugins in the Gatsby repo to be compatibleTutorial for plugin creators to make their plugins compatible with the configuration work flowHappy to take PRs against this branch to complete tasks. Please comment if you're going to take a task so we know!
UPDATE [18-03-2019]: Crossed out things no longer being done on this PR. It's not that we don't like these ideas. We're just simplifying this PR.