react-sketchbook

0.1.2 • Public • Published

React sketchbook (ALPHA)

Early stage CLI tool for staging react components with a zero config webpack dev server (based on create-react-app).

  • Based off of create-react-app with added support for css modules
  • Currently the tool does nothing else than mount the default

Install with npm

npm install react-sketchbook 

How it works

The React-Sketchbook CLI takes one argument (a filename). It injects the default export of given file into the staging environment and does nothing else (right now).

So given a module like this:

// some-react-component.js
const SomeComponent = () => (
  <div>Hello World</div>
);
 
export default SomeComponent;

You can point the cli at the file above

sketch ./some-react-component.js

React-Sketchbook will render the component in staging environment.

Usage

Basic usage

sketch some-react-component.js

Add root paths

If you include other folders than node_modules in your paths you can add them with the -p option, separated by comma:

sketch some-react-component.js -p ../local_modules,../lib

That way if you have a module in ../local_modules/some-module.js you can import it like this:

import someModule  from 'some-module';

Readme

Keywords

none

Package Sidebar

Install

npm i react-sketchbook

Weekly Downloads

2

Version

0.1.2

License

none

Last publish

Collaborators

  • juliankrispel