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

Addon-docs: Support non-story exports in MDX #7188

Merged
merged 4 commits into from
Jun 25, 2019
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Jun 25, 2019

Issue: #6995

What I did

Update the MDX compiler to support the includeStories metadata introduced in #7185

How to test

See the stories under Addons > Docs > mdx which have non-story exports

@vercel
Copy link

vercel bot commented Jun 25, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

LGTM -- I assume this includes the other PR?

if (parameters && parameters.expression) {
const { code: params } = generate(parameters.expression, {});
parameters = `parameters: ${params},`;
parameters = params;
Copy link
Member

Choose a reason for hiding this comment

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

You can do this in one line with

({ code: parameters } = generate(parameters.expression, {}));

For better or worse 🤷‍♂

@shilman shilman merged commit ba5ef30 into next Jun 25, 2019
@shilman shilman deleted the 6995-mdx-non-story-exports branch June 25, 2019 09:52
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.

None yet

3 participants