Skip to content

Commit

Permalink
docs(storybook): migrated to the modern config format
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed Jun 15, 2020
1 parent 956f553 commit 80d9de3
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 63 deletions.
2 changes: 0 additions & 2 deletions .storybook/addons.js

This file was deleted.

25 changes: 0 additions & 25 deletions .storybook/config.js

This file was deleted.

11 changes: 11 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const webpack = require('webpack');

module.exports = {
stories: ['../src/**/stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
webpackFinal: config => {
config.plugins.push(new webpack.DefinePlugin({'process.env': {ANY_SEED: JSON.stringify(0.4070123094134033)}}));

return config;
}
};
12 changes: 12 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import {addDecorator} from '@storybook/react';
import {fontFamily, fontSize} from '../src/styles';

global.__PATH_PREFIX__ = ''; // eslint-disable-line no-underscore-dangle
global.__BASE_PATH__ = ''; // eslint-disable-line no-underscore-dangle

addDecorator(story => (
<div css={{fontFamily, fontSize}}>
{story()}
</div>
));
7 changes: 0 additions & 7 deletions .storybook/webpack.config.js

This file was deleted.

54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"clean": "rimraf lib/",
"lint:md": "remark --frail .",
"lint:js": "eslint . .storybook --cache",
"lint:js": "eslint . .storybook/ --cache",
"lint:travis": "travis-lint .travis.yml",
"lint:peer": "npm ls --production >/dev/null",
"tests:unit": "mocha 'src/**/*-test.js'",
Expand Down Expand Up @@ -53,7 +53,7 @@
"@dsmjs/eslint-config-react": "1.1.32",
"@dsmjs/remark-preset-lint": "1.0.7",
"@emotion/babel-preset-css-prop": "^10.0.27",
"@percy-io/percy-storybook": "2.1.0",
"@percy/storybook": "3.3.0",
"@storybook/addon-actions": "^5.2.4",
"@storybook/addon-links": "^5.2.4",
"@storybook/react": "^5.2.4",
Expand Down

0 comments on commit 80d9de3

Please sign in to comment.