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

refactor: expose gatsby-transformer-raml options #271

Merged
merged 4 commits into from
Feb 3, 2020

Conversation

davifantasia
Copy link
Contributor

Closes #230

@vercel
Copy link

vercel bot commented Feb 3, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/commercetools/commercetools-docs-kit/czf7i7web
✅ Preview: https://commercetools-docs-kit-git-raml-transformer-options.commercetools.now.sh

Copy link
Member

@emmenko emmenko left a comment

Choose a reason for hiding this comment

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

From a code perspective this looks fine to me, can't say too much about the logic though

@@ -12,7 +12,7 @@ module.exports = (themeOptions = {}) => ({
'@commercetools-docs/gatsby-transformer-mdx-introspection',
{
resolve: '@commercetools-docs/gatsby-transformer-raml',
options: {},
options: { ...themeOptions.transformerRaml },
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
options: { ...themeOptions.transformerRaml },
options: themeOptions.transformerRaml,

@@ -53,6 +53,52 @@ module.exports = {
};
```

### API Specs Directory Structure

One of the benefits of the gatsby-transformer-raml tool is that it supports multiple api specs parsing. For this to work properly, we recommend setting up the the specs root directory such that all the specs directory are flattened. See example below:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
One of the benefits of the gatsby-transformer-raml tool is that it supports multiple api specs parsing. For this to work properly, we recommend setting up the the specs root directory such that all the specs directory are flattened. See example below:
One of the benefits of the gatsby-transformer-raml tool is that it supports multiple api specs parsing. For this to work properly, we recommend setting up the specs root directory such that all the specs directory are flattened. See example below:

packages/gatsby-transformer-raml/README.md Show resolved Hide resolved
loadNodeContent,
reporter,
},
{ includeApis = [], movePropertiesToTop = [], movePropertiesToBottom = [] }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{ includeApis = [], movePropertiesToTop = [], movePropertiesToBottom = [] }
{ includeApis = [], movePropertiesToTop = [], movePropertiesToBottom = [] } = {}

@emmenko emmenko changed the title gatsby-transformer-raml options refactor: expose gatsby-transformer-raml options Feb 3, 2020
@vercel vercel bot temporarily deployed to Preview February 3, 2020 13:25 Inactive
@vercel vercel bot temporarily deployed to Preview February 3, 2020 13:33 Inactive
@davifantasia davifantasia merged commit edb5fb9 into master Feb 3, 2020
@davifantasia davifantasia deleted the raml-transformer-options branch February 3, 2020 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Options for gatsby-transformer-raml
2 participants