Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lwce/lwc-storybook-cli

Package Overview
Dependencies
Maintainers
6
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwce/lwc-storybook-cli

Create a storybook for your application

  • 0.6.22
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
30
decreased by-26.83%
Maintainers
6
Weekly downloads
 
Created
Source

LWC Storybook CLI

A CLI tool for quickly getting started with storybook in LWC projects

Getting started

  1. Add lwc-storybook-cli as a dependency to your project:
npm install --save-dev @lwce/lwc-storybook-cli

# OR

yarn add --dev @lwce/lwc-storybook-cli
  1. Add to your package.json:
"scripts": {
  "storybook:build": "lwc-storybook build",
  "storybook:start": "lwc-storybook start",
}
  1. Make sure your lwc.config.json has the following module entry:
"modules": [
    ...
    {
        "npm": "lwc-components-lightning"
    }
],
  1. Optionally, add a mocked-core-modules-data.js file to the root of your project. The file should export a single getData function:
export function getData() {
    return {
        // Any data defined will be provided to the mocked core modules
    }
}
  1. Add .storybook to your .gitignore

Commands

start

Start storybook in development mode

Command: lwc-storybook start

build

Build storybook with an output that can be hosted on a static web server. Defaults the output to .storybook/build/public

Command: lwc-storybook build

story

Follow the prompts to generate a story

Command: lwc-storybook story

FAQs

Package last updated on 14 Dec 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc