Skip to content

Commit

Permalink
Add storybook support
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Mar 24, 2016
1 parent 4c4c721 commit 79890dc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { configure } from 'react-storybook';
import 'todomvc-app-css/index.css'

function loadStories() {
require('../components/stories/');
}

configure(loadStories, module);
13 changes: 13 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const path = require('path');

module.exports = {
module: {
loaders: [
{
test: /\.css?$/,
loaders: [ 'style', 'raw' ],
include: path.resolve(__dirname, '../')
}
]
}
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"start": "node server.js",
"test": "cross-env NODE_ENV=test mocha --recursive --compilers js:babel-register --require ./test/setup.js",
"test:watch": "npm test -- --watch"
"test:watch": "npm test -- --watch",
"storybook": "storybook-server 9001"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -42,6 +43,7 @@
"todomvc-app-css": "^2.0.1",
"webpack": "^1.9.11",
"webpack-dev-middleware": "^1.2.0",
"webpack-hot-middleware": "^2.9.1"
"webpack-hot-middleware": "^2.9.1",
"react-storybook": "^0.11.0"
}
}

0 comments on commit 79890dc

Please sign in to comment.