Skip to content

Commit

Permalink
adjust README
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Siekmann committed Jun 7, 2019
1 parent 2108ac2 commit 6d3e7f6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ Then create a file called `addons.js` in your .storybook directory and import th
import 'storybook-design-token/register';
```

Create a file called `config.js` in your .storybook directory and tell the plugin what stylesheets to parse:
Create a file called `config.js` in your .storybook directory and tell the plugin what files to parse. **Important:** Call `addParameters` before making the `configure` call.

```js
// config.js
import { addParameters } from '@storybook/react';
import { configure, addParameters } from '@storybook/react';

// [...]

const cssReq = require.context('!!raw-loader!../src', true, /.\.css$/);
const cssTokenFiles = cssReq.keys().map(filename => cssReq(filename));
Expand All @@ -66,6 +68,10 @@ addParameters({
}
}
});

// [...]

configure(loadStories, module);
```

Make sure to specify the right path after `!!raw-loader!`. The path has to be relative to your config file location.
Expand Down

0 comments on commit 6d3e7f6

Please sign in to comment.