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

Reuse react-styleguidist as a React component, not a separate app? #107

Closed
sompylasar opened this issue Mar 23, 2016 · 5 comments
Closed
Labels

Comments

@sompylasar
Copy link

Like this:
https://github.com/skidding/react-component-playground

Is this possible?

I'd like to plug it into my app on a separate route.

@sapegin
Copy link
Member

sapegin commented Mar 24, 2016

I’m not sure it’s possible because we have a lot of stuff in Webpack loaders. It might work with a lot of copy-pasting from Styleguidist to your app so you can use components from Styleguidist but I’m not sure it’s worth it.

@sapegin
Copy link
Member

sapegin commented Mar 24, 2016

Maybe better solution is just to publish it as a static page and have a link in your app. And use Styleguidist server to develop new components.

@mik01aj
Copy link
Collaborator

mik01aj commented Mar 24, 2016

@sompylasar I think you could actually try this way: try to modify the webpack config (that one for static website, produced from makeWebpackConfig) to build a bundle with just the root component exposed.

@sompylasar
Copy link
Author

OK, then, I think, I will have to run styleguidist server as a child process and expose it on a routed page in an iframe.

For future, it would be very useful for styleguidist to have a JS API that takes a config object and starts the server, not just the CLI with the file-based config.

@sapegin
Copy link
Member

sapegin commented Mar 24, 2016

Yeah, and I’ll be happy to merge such pull request ;-)

@sapegin sapegin mentioned this issue Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants