React Component Isolation Playground
JavaScript CSS HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.bin
demo
isolate-src
isolate-styles
isolate-vendor
.eslintrc
.gitignore
.npmignore
CHANGELOG.md
README.md
config.js
index.html
isolate.config.js
package.json
webpack.config.js

README.md

WIP

v2.. requires babel v6+

wercker status

React Component Isolate

All-in-one development, documentation, testing environment for React components

Getting started

Install

npm install -g react-isolate

Configuring

There are 2 ways to configure the runner. From the command-line or with a config file

CLI

$ react-isolate --componentsPath=demo/components --fixturesPath=demo/fixtures

isolate.config.js

Create a file in your project root directory named isolate.config.js and export the needed variables

module.exports = {
	fixturesPath: 'demo/fixtures',
	componentsPath: 'demo/components'
};

Folder structure

If components have their own folder I suggest having the fixture for that in the same manner

/components
	/MyList
    	MyList.js
/fixtures
	/MyList
    	simple.js
    	alternative.js

The system will pick up and match if the component is in a top-level folder but the fixture need to have a folder with the same name

/components
	/MyList.js
    /Menu.js
/fixtures
	/MyList
    	simple.js
        alternative.js
    /Menu
    	vertical.js

Todo / Ideas

https://github.com/eisisig/react-isolate/issues