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

Add support for plugin dependencies #27995

Merged
merged 3 commits into from Nov 12, 2020

Conversation

ascorbic
Copy link
Contributor

For discussion, this is a possible approach to allow plugin dependencies and plugin options. It handles possible duplicate plugin entries for e.g. source filesystem by allowing entries with the form "name:key", e.g. "gatsby-source-filesystem:pages"

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 12, 2020
@ascorbic ascorbic added topic: cli Related to the Gatsby CLI and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 12, 2020
Copy link
Contributor

@laurieontech laurieontech left a comment

Choose a reason for hiding this comment

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

This looks reasonable. I am wondering if having dependencies and plugins and options is redundant? And if it might be easier to include a boolean for whether or not something is a plugin that needs to be included in the config?

Either way, this is a fine way to do it.

packages/create-gatsby/src/index.ts Outdated Show resolved Hide resolved
@ascorbic ascorbic marked this pull request as ready for review November 12, 2020 15:08
@ascorbic ascorbic requested a review from a team as a code owner November 12, 2020 15:08
@ascorbic ascorbic changed the title WIP: Add support for plugin dependencies Add support for plugin dependencies Nov 12, 2020
@ascorbic ascorbic merged commit 009ed62 into feat/create-gatsby Nov 12, 2020
@delete-merged-branch delete-merged-branch bot deleted the add-plugin-dependencies branch November 12, 2020 15:11
laurieontech pushed a commit that referenced this pull request Nov 12, 2020
* Add create-gatsby

* add question and readme, update some wording

* Update readme

* Update handling of questions

* Stylish!

* Update message

* Update messages

* Catch ctrl^c

* v0.0.0-2

* Add test

* Fix test

* feat(gatsby): Add "gatsby plugin add" command

* Load readme from local package

* ensure skipped steps are actually skipped

* attempt to add some more tests

* Move command to cli

* Try to install plugins

* feat(create-gatsby): add wip plugin configuration forms (#27801)

* add wip plugin configuration forms

* Use plugins array

* Typings

Co-authored-by: Matt Kane <matt@gatsbyjs.com>

* Install plugins

* Add error handling

* Return, don't exit

* Fix tests

* Resolve themes relative to root

* Change back to original dir

* Use starter with canary

* v0.0.0-3

* Fix to force publish

* Working!

* Change from review

* Fix package name

* Use gatsby-source-wordpress-experimental

* Add schema import script

* v0.0.0-4

* Add dep

* v0.0.0-5

* handle peer dependencies

* forgot to save a file

* bump core-utils dependency

* update styling and text to match Flo's design, in progress

* use magenta for all actions to be taken

* add final prompts

* consistent coloring

* consistent coloring

* consistent coloring

* Initial input test

* Layout helpers

* Add custom textinput prompt

* Fixes to hint

* Fix error

* Add select control

* update options for gatsby new

* Tab to end

* update tests

* send both tabs

* it was the right hex code, or not

* order shouldn't matter but I'm very confused

* will slash tab work

* Formatting fixes

* v0.0.0-6

* use down inside of tab

* test enter

* trying one more thing, but suspect it's unrelated

* Update packages/create-gatsby/src/cmses.json

Co-authored-by: Lennart <lekoarts@gmail.com>

* Update packages/create-gatsby/src/styles.json

Co-authored-by: Lennart <lekoarts@gmail.com>

* one more time

* bane of my existence

* try different keys for different OS

* somehow bypasses linter

* remove console.log

* add fake plugin schemas for other cmses

* Fix test

* Longer tick

* Add description to form inputs

* Test changes

* increase interval

* add initial working test

* missing return type

* not sure why linter keeps skipping these diles

* all tests except project name exists

* just in case it's a timeout thing

* does a single question pass

* have CI run individual questions and see if we falter

* Test

* Burn it with fire 🔥

* Move components into plugin

* Replace Prismic with Dato

* Install plugins at the start

* Add support for plugin dependencies (#27995)

* feat(create-gatsby): Add support for plugin dependencies

* Fix extra plugin handling

* Apply suggestions from code review

Co-authored-by: Max Stoiber <contact@mxstbr.com>

* Remove broken tests 😢

Co-authored-by: Kyle Gill <kylerobertgill@gmail.com>
Co-authored-by: Laurie <laurie@gatsbyjs.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
Co-authored-by: Lennart <lekoarts@gmail.com>
Co-authored-by: Max Stoiber <contact@mxstbr.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cli Related to the Gatsby CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants