question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Storybook: support generating stories for components in secondary entrypoints

See original GitHub issue

Description

It seems that generating stories for components, using nx g @nrwl/angular:stories <project-name>, currently only works for components declared in the primary entrypoint of a library, not for components declared in secondary entrypoints.

Motivation

Since secondary entrypoints have been introduced in NX devtools 13.1 to enhance library architecture, support treeshaking, it makes sense to support being able to generate stories for the components declared in those entrypoints.

Suggested Implementation

Generate stories for both primary and secondary entrypoints when running nx g @nrwl/angular:stories <project-name>

Alternate Implementations

  • Add an option to generate stories for all entrypoints like nx g @nrwl/angular:stories <project-name> --allEntrypoints
  • Generate stories for components in a specific entrypoint like nx g @nrwl/angular:stories <project-name> --entrypoint=<entrypoint-name>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mandarinicommented, Aug 5, 2022

Thanks for opening #11446 @SvenBudak !

1reaction
mandarinicommented, Apr 28, 2022

Hi there @pvds ! We’ll add this in the plans to take a look as a new feature. In the meantime, if you think you’re up for it, let me know if you want to give this a shot! I can help you out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stories for multiple components - Storybook - JS.ORG
It's useful to write stories that render two or more components at once if those components are designed to work together. For example,...
Read more >
Creating a React component library using Storybook 6
Learn how to build a React component library using Storybook 6 and TypeScript, compile it with Rollup and publish it.
Read more >
Angular Library + Storybook - DEV Community ‍ ‍
Storybook is a tool that allows you to easily create and document UI components. It works with several different libraries and frameworks, ...
Read more >
Multiple entry points for React Native Storybook | Danny's Blog
Intro React Native storybook is setup in such a way that the decision is left to the user ... 5components/ ... Creating a...
Read more >
Storybook and angular library: Cannot read property 'selector ...
Describe the bug When I generate a component in an angular library (ng11), ... import {Meta, Story} from '@storybook/angular/types-6-0' // import ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found