From 60bdf01d70dbb312ba9ad65414b1304ff90daea1 Mon Sep 17 00:00:00 2001 From: David Inga Date: Wed, 15 Feb 2017 18:02:24 +0100 Subject: [PATCH] storybook works again :) --- .storybook/webpack.config.js | 6 ++++++ package.json | 7 ++++++- postcss.config.js | 7 +++++++ stories/index.js | 12 ++++++------ 4 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 postcss.config.js diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 2874b9a..3f14a1c 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -2,6 +2,12 @@ const path = require('path'); module.exports = function(storybookBaseConfig, configType) { + storybookBaseConfig.module.loaders.push({ + test: /\.css$/, + loaders: ['style', 'css'], + include: path.resolve(__dirname, '../') + }); + storybookBaseConfig.module.loaders.push({ test: /\.(scss|sass)$/, loaders: ['style', 'css', 'sass', 'postcss'], diff --git a/package.json b/package.json index 37ece56..1da7ff5 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,14 @@ "babel-cli": "^6.23.0", "babel-preset-latest": "^6.22.0", "babel-preset-react": "^6.16.0", + "css-loader": "^0.26.1", "eslint": "^3.15.0", "eslint-config-vizzuality": "^1.0.3", "gulp": "^3.9.1", - "node-sass": "^3.13.0" + "node-sass": "^3.13.1", + "postcss-loader": "^1.3.0", + "sass-loader": "^6.0.0", + "style-loader": "^0.13.1", + "url-loader": "^0.5.7" } } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..c3af23c --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,7 @@ +const autoprefixer = require('autoprefixer'); + +module.exports = { + plugins: [ + autoprefixer() + ] +}; diff --git a/stories/index.js b/stories/index.js index b98f038..310ef80 100644 --- a/stories/index.js +++ b/stories/index.js @@ -1,11 +1,11 @@ import React from 'react'; import { storiesOf, action, linkTo } from '@kadira/storybook'; -import Globe from '../components/Globe'; -import Modal from '../components/Modal'; -import Spinner from '../components/Spinner'; -import RadioGroup from '../components/Form/RadioGroup'; -import CheckboxGroup from '../components/Form/CheckboxGroup'; -import SvgIcon from '../components/SvgIcon'; +import Globe from '../dist/Globe'; +import Modal from '../dist/Modal'; +import Spinner from '../dist/Spinner'; +import RadioGroup from '../dist/Form/RadioGroup'; +import CheckboxGroup from '../dist/Form/CheckboxGroup'; +import SvgIcon from '../dist/SvgIcon'; storiesOf('UI Components', module) .add('Modal', () => (