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

Fix getExampleFilename customization if file is not exist #1362

Merged

Conversation

mendrew
Copy link
Contributor

@mendrew mendrew commented May 15, 2019

If a file does not exist in fs we have errors during the build.
In this case, we should continue to use the default example file.

iss: #1338

If file is not exist in fs we have errors during the build.
In this case we should continue to use default example file

iss: styleguidist#1338
@codecov-io
Copy link

Codecov Report

Merging #1362 into master will not change coverage.
The diff coverage is 100%.

Impacted Files Coverage Δ
src/loaders/utils/getExamples.js 100% <100%> (ø) ⬆️

@sapegin sapegin merged commit 6be7433 into styleguidist:master May 16, 2019
sapegin pushed a commit that referenced this pull request May 16, 2019
## New features

### Support React Hooks in examples

You can now use hooks in the examples, like the `useState` hook:

 ```jsx
const [count, setCount] = React.useState(42);
<Button onClick={() => setCount(count + 1)}>{count}</Button>
```

(#1353 by @eragon512)

## Bug fixes

* Accessibility fixes ([#1359](#1359) by @J-Kallunki)
* `getExampleFilename` should use default example if file does not exist ([#1362](#1362)) by @mendrew, closes [#1338](#1338)
* Hide HTML comments in Markdown files ([#1347](#1347) by @eragon512, closes #1326)
@styleguidist-bot
Copy link
Collaborator

🎉 This PR is included in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants