Giter VIP home page Giter VIP logo

vue-cli-storybook-docs's Introduction

Vue Cli + Typescript + Storybook + Addon Docs Working Example

I've seen a lot of people struggle to get storybook and vue CLI working side-by-side, particularly with the new addon-docs. So here's a working example.

Steps I used to create:

  1. Init a typescript project with Vue-Cli (v4, which was just released)
  2. Add Vue Cli Storybook Plugin
  3. Disable Vue Jsx in the babel config (Vue Jsx is temporarily incompatible with addon-docs):
// babel.config.js
module.exports = {
  presets: [["@vue/cli-plugin-babel/preset", {
    jsx: false
  }]]
};

Install dependencies

yarn

Activates storybook server and begins code watch

yarn storybook:serve

Builds a static version of storybook

yarn storybook:build

Lints and fixes files

yarn lint --fix

vue-cli-storybook-docs's People

Contributors

aaron-pool avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

darl0ck

vue-cli-storybook-docs's Issues

Table of Props not showing up

Hello,

In a fresh install when trying to add the table of props, doesn't work. It says: Cannot read property '_c' of undefined

I'm trying to add the table by using the <Props of=MyButton/> (previously added demo props in MyButton for the demo).

Has anyone encountered this issue? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.