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

auto spread arrays of plugins #925

Closed
1 of 5 tasks
Tracked by #979
thescientist13 opened this issue Apr 1, 2022 · 0 comments · Fixed by #969
Closed
1 of 5 tasks
Tracked by #979

auto spread arrays of plugins #925

thescientist13 opened this issue Apr 1, 2022 · 0 comments · Fixed by #969
Assignees
Labels
alpha.0 CLI documentation Greenwood specific docs enhancement Improve something existing (e.g. no docs, new APIs, etc) good first issue Good for newcomers Plugins Greenwood Plugins v0.27.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Apr 1, 2022

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Some Greenwood plugins return an array of plugins, and so user's have to spread the plugin itself in greenwood.config.js. Example:

import { greenwoodPluginFoo } from 'greenwood-plugin-foo';

export default {
  plugins: [
    ...greenwoodPluginFoo()
  ]
}

Details

Instead, Greenwood easily detect if this value was an array and spread it automatically, so user's wouldn't have to do this themselves, so the equivalent would now look like this

import { greenwoodPluginFoo } from 'greenwood-plugin-foo';

export default {
  plugins: [
    greenwoodPluginFoo()
  ]
}

We would also want to make sure to update our README's to remove the ... from any example docs.

@thescientist13 thescientist13 added the enhancement Improve something existing (e.g. no docs, new APIs, etc) label Apr 1, 2022
@thescientist13 thescientist13 added this to the 1.0 milestone Apr 1, 2022
@thescientist13 thescientist13 added documentation Greenwood specific docs CLI good first issue Good for newcomers labels Apr 1, 2022
@thescientist13 thescientist13 changed the title auto spread plugin arrays auto spread arrays of plugins Aug 2, 2022
@thescientist13 thescientist13 self-assigned this Aug 2, 2022
@thescientist13 thescientist13 added the Plugins Greenwood Plugins label Aug 2, 2022
@thescientist13 thescientist13 mentioned this issue Sep 22, 2022
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.0 CLI documentation Greenwood specific docs enhancement Improve something existing (e.g. no docs, new APIs, etc) good first issue Good for newcomers Plugins Greenwood Plugins v0.27.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant