This repository contains a setup for using Storybook with the LWC (Lightning Web Components) Webpack plugin. It allows you to preview and document your LWC component library online.
To get started with this project, follow these steps:
npm install
To run Storybook locally for development:
npm run storybook
This project includes a Dockerfile
to simplify the process of building and deploying the project in a containerized environment.
To build the Docker image:
docker build -t storybook-lwc .
To start the container and serve the Storybook application:
docker run -p 6006:6006 storybook-lwc
Once the container is running, you can access the Storybook application in your browser at http://localhost:6006
.
- LWC Components: Place all LWC components in the
src/modules/c
directory. - Stories and Documentation: Place all
.story.js
and.mdx
files in thestories
directory.
This setup enables you to explore and document your LWC components interactively. You can view different states of each component and their corresponding documentation.
If you wish to contribute to this project, please follow the standard Git workflow:
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and commit them.
- Submit a pull request.
We appreciate your contributions!
This project is licensed under the GNU General Public License. See the LICENSE
file for more details.