0.6.22 • Published 2 years ago
@lwce/lwc-storybook-cli v0.6.22
LWC Storybook CLI
A CLI tool for quickly getting started with storybook in LWC projects
Getting started
- 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
- Add to your package.json:
"scripts": {
"storybook:build": "lwc-storybook build",
"storybook:start": "lwc-storybook start",
}
- Make sure your lwc.config.json has the following module entry:
"modules": [
...
{
"npm": "lwc-components-lightning"
}
],
- Optionally, add a
mocked-core-modules-data.js
file to the root of your project. The file should export a singlegetData
function:
export function getData() {
return {
// Any data defined will be provided to the mocked core modules
}
}
- 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
0.6.21
2 years ago
0.6.22
2 years ago
0.6.20
2 years ago
0.6.19
3 years ago
0.6.18
3 years ago
0.6.17
3 years ago
0.6.16
3 years ago
0.6.15
3 years ago
0.6.14
3 years ago
0.6.10
3 years ago
0.6.12
3 years ago
0.6.11
3 years ago
0.6.13
3 years ago
0.6.3
3 years ago
0.6.4
3 years ago
0.6.2
3 years ago
0.6.0
3 years ago
0.5.7
3 years ago
0.5.6
3 years ago
0.5.4
3 years ago
0.5.5
3 years ago
0.5.3
3 years ago
0.5.2
3 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago