react-sketchbook
Early stage CLI tool for staging react components with a zero config webpack dev server (based on create-react-app).
Last updated 3 years ago by juliankrispel .
Original npm · Tarball · package.json
$ cnpm install react-sketchbook 
SYNC missed versions from official npm registry.

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';

Current Tags

  • 0.1.2                                ...           latest (3 years ago)

1 Versions

  • 0.1.2                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 1
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |