Reader small image

You're reading from  React 16 Tooling

Product typeBook
Published inApr 2018
Reading LevelBeginner
PublisherPackt
ISBN-139781788835015
Edition1st Edition
Languages
Tools
Right arrow
Authors (2):
Adam Boduch
Adam Boduch
author image
Adam Boduch

Adam Boduch has been involved in large-scale JavaScript development for nearly 15 years. Before moving to the frontend, he worked on several large-scale cloud computing products using Python and Linux. No stranger to complexity, Adam has practical experience with real-world software systems and the scaling challenges they pose.
Read more about Adam Boduch

Christopher Pitt
Christopher Pitt
author image
Christopher Pitt

Christopher Pitt is a principal developer for SilverStripe in Wellington, New Zealand. He usually works on open source software, though sometimes you'll find him building compilers and robots.
Read more about Christopher Pitt

View More author details
Right arrow

Installing and configuring Storybook


The first step to using Storybook is installing the global command-line tool. It's installed as a global tool because it can be used with many projects at the same time, and it can be used to bootstrap new projects. Let's start with this first step:

npm install @storybook/cli -g

Once this installation is done, you have the command-line tool that's used to modify your package.json dependencies and generate boilerplate Storybook files. Let's assume that you've used create-react-app to create a new application. Change into your application directory, and use the Storybook command-line tool to add Storybook to your current project:

getstorybook

The getstorybook command does a number of things for you when you run it. Here's what you should see as the output when you run this command:

getstorybook - the simplest way to add a storybook to your project. 
Detecting project type.
Adding storybook support to your "Create React App" based project.
Preparing to install...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
React 16 Tooling
Published in: Apr 2018Publisher: PacktISBN-13: 9781788835015

Authors (2)

author image
Adam Boduch

Adam Boduch has been involved in large-scale JavaScript development for nearly 15 years. Before moving to the frontend, he worked on several large-scale cloud computing products using Python and Linux. No stranger to complexity, Adam has practical experience with real-world software systems and the scaling challenges they pose.
Read more about Adam Boduch

author image
Christopher Pitt

Christopher Pitt is a principal developer for SilverStripe in Wellington, New Zealand. He usually works on open source software, though sometimes you'll find him building compilers and robots.
Read more about Christopher Pitt