The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.
@nx/storybook is an npm package that integrates Storybook with the Nx build system. It allows you to efficiently manage and develop UI components in isolation, providing a seamless experience for building, testing, and documenting components within an Nx workspace.
What are @nx/storybook's main functionalities?
Setup Storybook for an Nx Workspace
This command sets up Storybook for a specific application within an Nx workspace. It configures the necessary files and dependencies to get Storybook up and running.
npx nx g @nx/storybook:configuration my-app
Generate Stories for Components
This command generates Storybook stories for all components in a specified library. It helps in quickly creating stories for existing components, making them available for isolated development and testing.
npx nx g @nx/storybook:stories my-lib
Run Storybook
This command starts the Storybook server for a specific application, allowing you to view and interact with your components in an isolated environment.
npx nx run my-app:storybook
Build Storybook
This command builds the static Storybook site for a specific application, which can then be deployed to a static site hosting service.
Storybook is the core package for building UI components in isolation. It provides a powerful interface for developing, testing, and documenting components. While @nx/storybook integrates Storybook with Nx, the core Storybook package can be used independently or with other build systems.
@storybook/react is a Storybook addon specifically for React components. It offers similar functionalities to @nx/storybook but is tailored for React projects. It does not provide the same level of integration with the Nx build system.
@storybook/angular is a Storybook addon for Angular components. Like @storybook/react, it offers functionalities for developing and testing Angular components in isolation but lacks the Nx-specific integrations provided by @nx/storybook.
@storybook/vue is a Storybook addon for Vue components. It provides similar functionalities for Vue projects, allowing developers to build and test Vue components in isolation. However, it does not integrate with the Nx build system like @nx/storybook.
Nx: Smart Monorepos · Fast CI
Nx is a build system, optimized for monorepos, with plugins for popular frameworks and tools and advanced CI capabilities including caching and distribution.
The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.
The npm package @nx/storybook receives a total of 223,797 weekly downloads. As such, @nx/storybook popularity was classified as popular.
We found that @nx/storybook demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 4 open source maintainers collaborating on the project.
Package last updated on 16 Sep 2024
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.