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

Rename exports & cleanup #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

tonyketcham
Copy link
Collaborator

Summary of changes

  • Removes unused dependencies
  • Introduces public export name changes discussed in Rename plugin semantics #100
    • Switches to use named exports to ensure consistency
      • Global search or find and replace will actually match all instances of usage
      • Examples in the wild will match our docs
  • Removes mandatory plugin dependencies from the flatbread package. Thus, these will not be installed unless you actually need them.

Closes #100
Closes #101

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • I added doc comments to any new public exports, and inline comments to any hard-to-understand areas
  • My changes generate no new console errors locally
  • If applicable, include a test that fails without this PR but passes with it

Does this introduce any non-backwards compatible changes?

  • Yes
  • No

Does this include any user config changes?

  • Yes
    • If so, I have updated the relevant areas of documentation
  • No

@tonyketcham tonyketcham added transformers Converting source data to GraphQL data sources Interacting with data sources config User config tidying Misc. improvements to the monorepo and DX labels Aug 12, 2022
@tonyketcham tonyketcham requested a review from odama626 August 12, 2022 05:43
@tonyketcham tonyketcham self-assigned this Aug 12, 2022
import { defineConfig } from 'flatbread';
import { sourceFilesystem } from '@flatbread/source-filesystem';
import { transformMarkdown } from '@flatbread/transformer-markdown';
import { transformYaml } from '@flatbread/transformer-yaml';
import { createSvImgField } from '@flatbread/resolver-svimg';
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we rename this too? resolveSvimgField?

@@ -44,8 +44,7 @@
},
"devDependencies": {
"@ava/typescript": "3.0.1",
"@nrwl/workspace": "14.4.3",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice!

pnpm i flatbread

# these are your likely suspects, but other plugins might fit your use cases
pnpm i flatbread @flatbread/transformer-markdown @flatbread/source-filesystem
```

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
Plugins provided
- Sources
-
- [@flatbread/source-filesystem](https://github.com/FlatbreadLabs/flatbread/tree/main/packages/source-filesystem)
- the basic file source, for reading files
> if you'd like to add your source here create a pr!
- Transformers
-
- [@flatbread/transformer-markdown](https://github.com/FlatbreadLabs/flatbread/tree/main/packages/transformer-markdown)
- transform markdown with optional grey matter header
- [@flatbread/transformer-yaml](https://github.com/FlatbreadLabs/flatbread/tree/main/packages/transformer-yaml)
- transform yaml
> if you'd like to add your transformer here submit a pr!
- Resolvers
-
- [@flatbread/resolver-svimg](https://github.com/FlatbreadLabs/flatbread/tree/main/packages/resolver-svimg)
- optimize images in style with svimg
> if you'd like to add your own resolver here submit a pr!

@@ -31,35 +31,27 @@
"*.d.ts"
],
"dependencies": {
"@apollo/utils.keyvaluecache": "^1.0.1",
"@apollo/utils.keyvaluecache": "1.0.1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should split out @flatbread/provider-apollo in the future too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config User config sources Interacting with data sources tidying Misc. improvements to the monorepo and DX transformers Converting source data to GraphQL data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove convenience re-exports from the flatbread package Rename plugin semantics
2 participants