Nx: [storybook] How about @storybook/addon-docs?

Created on 22 Nov 2019  路  6Comments  路  Source: nrwl/nx

_Please make sure you have read the submission guidelines before posting an issue_

Prerequisites

Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • [x] I am running the latest version
  • [x] I checked the documentation and found no answer
  • [x] I checked to make sure that this issue has not already been filed
  • [x] I'm reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

@nrwl/storybook includes @storybook/addon-docs
https://github.com/storybookjs/storybook/tree/master/addons/docs
https://www.npmjs.com/package/@storybook/addon-docs

Today, I tried updating to 8.8.0.
It's awesome!
I especially excited about supporting Storybook.

Btw, @storybook/addon-docs is good. Because it allows to write documents in mdx.
So, I'd like to contain @storybook/addon-docs in @nrwl/storybook.
What do you think about this?

I set up @storybook/addon-docs by myself in this repo.
Check: https://github.com/tyankatsu0105/sandbox-nx-storybook

Current Behavior

Failure Information (for bugs)

Steps to Reproduce

Context

Failure Logs

Most helpful comment

Thank you for your suggestion :) We are somewhat hesitant about adding addons by default (beyond knobs), simply because they are almost by definition things that not everyone will use. That being said, something we will do is add some documentation on how to update the configuration for a library or a whole repo to make it easier for people to add them themselves.

All 6 comments

As a note - the Docs addon gets update almost every 24 hours so I'd be a bit cautious to adding it until it hits at least a single major release. I agree it's really nice though :)

Thank you for your suggestion :) We are somewhat hesitant about adding addons by default (beyond knobs), simply because they are almost by definition things that not everyone will use. That being said, something we will do is add some documentation on how to update the configuration for a library or a whole repo to make it easier for people to add them themselves.

Thank you for the reply :)

they are almost by definition things that not everyone will use

Yes. I think so too. I agree with your opinion.

add some documentation on how to update the configuration for a library or a whole repo to make it easier for people to add them themselves

It's cool! If that will be realized, I'm very happy!

@mbriggs Please provide any documentation or steps to add Docs addon on nx angular[Storybook] for CompoDoc.

@himanshu803 Based on my experience it is required to update the storybook config according to this Migration Guide. Then you can follow the default guide.

@himanshu803 you may use Storybook Docs addon with Angular with some pipes&tape as explained in the documentation: https://github.com/storybookjs/storybook/blob/HEAD/addons/docs/angular/README.md

For NX you may use compodoc plugin https://github.com/twittwer/nx-tools/tree/master/libs/compodoc#readme

But I can't figure out how to automatically refresh compodoc and Storybook Docs on changes.

Was this page helpful?
0 / 5 - 0 ratings