Skip to content

Commit

Permalink
Merge pull request #6129 from aamct2/fix-md-linting
Browse files Browse the repository at this point in the history
Fix linting errors in docs
  • Loading branch information
ndelangen authored Mar 18, 2019
2 parents 7c7ecbb + 39a6ded commit e6a5195
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/configurations/theming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ addParameters({

When setting a theme, set a full theme object. The theme is replaced not combined.

See more addon options at https://github.com/storybooks/storybook/tree/master/addons/options
View more [addon options in the master branch](https://github.com/storybooks/storybook/tree/master/addons/options).

## Get a theme

Expand Down
40 changes: 20 additions & 20 deletions docs/src/pages/guides/guide-react/new.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Make sure that you have `vue`, `vue-loader`, `vue-template-compiler`, `@babel/co

```sh
npm install vue --save
npm install babel-loader vue-loader vue-template-compiler @babel/core --save-dev
npm install babel-loader vue-loader vue-template-compiler @babel/core --save-dev
```

## Step 2: Add a npm script
Expand Down Expand Up @@ -63,58 +63,58 @@ configure(loadStories, module);
That'll load stories in `../stories/index.js`. You can choose where to place stories, you can co-locate them with source files, or place them in an other directory.

> Requiring all your stories becomes bothersome real quick, so you can use this to load all stories matching a glob.
>
>
> <details>
> <summary>details</summary>
>
>
> ```js
> import { configure } from '@storybook/vue';
>
>
> function loadStories() {
> const req = require.context('../stories', true, /\.stories\.js$/);
> req.keys().forEach(filename => req(filename));
> }
>
>
> configure(loadStories, module);
> ```
>
>
> </details>
>
>
> You might be using global components or vue plugins such as vuex, in that case you'll need to register them in this `config.js` file.
>
>
> <details>
> <summary>details</summary>
>
>
> ```js
> import { configure } from '@storybook/vue';
>
>
> import Vue from 'vue';
>
>
> // Import Vue plugins
> import Vuex from 'vuex';
>
>
> // Import your global components.
> import Mybutton from '../src/stories/Button.vue';
>
>
> // Install Vue plugins.
> Vue.use(Vuex);
>
>
> // Register global components.
> Vue.component('my-button', Mybutton);
>
>
> function loadStories() {
> // You can require as many stories as you need.
> require('../src/stories');
> }
>
>
> configure(loadStories, module);
> ```
>
>
> This example registered your custom `Button.vue` component, installed the Vuex plugin, and loaded your Storybook stories defined in `../stories/index.js`.
>
>
> All custom components and Vue plugins should be registered before calling `configure()`.
>
>
> </details>
Expand Down
34 changes: 17 additions & 17 deletions docs/src/pages/guides/guide-riot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npm install @storybook/riot --save-dev
Make sure that you have `riot`, `@babel/core`, and `babel-loader` in your dependencies as well because we list these as a peer dependencies:

```sh
npm install riot babel-loader @babel/core --save-dev
npm install riot babel-loader @babel/core --save-dev
```

## Step 2: Add a npm script
Expand Down Expand Up @@ -66,48 +66,48 @@ configure(loadStories, module);
That'll load stories in `../stories/index.js`. You can choose where to place stories, you can co-locate them with source files, or place them in an other directory.

> Requiring all your stories becomes bothersome real quick, so you can use this to load all stories matching a glob.
>
>
> <details>
> <summary>details</summary>
>
>
> ```ts
> import { configure } from '@storybook/riot';
>
>
> function loadStories() {
> const req = require.context('../stories', true, /\.stories\.ts$/);
> req.keys().forEach(filename => req(filename));
> }
>
>
> configure(loadStories, module);
> ```
>
>
> </details>
>
>
> Additionally this is the place where you can register global component.
>
>
> <details>
> <summary>details</summary>
>
>
> ```ts
> import { configure } from '@storybook/riot';
>
>
> // Import your globally available components.
> import '../src/stories/Button.tag';
>
> import '../src/stories/Button.tag';
>
> function loadStories() {
> require('../stories/index.js');
> // You can require as many stories as you need.
}
>
> }
>
> configure(loadStories, module);
> ```
>
>
> </details>
## Step 4: Storybook TypeScript configuration
`@storybook/riot` is using [ForkTsCheckerWebpackPlugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) to boost the build performance.
`@storybook/riot` is using [ForkTsCheckerWebpackPlugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) to boost the build performance.
This makes it necessary to create a `tsconfig.json` file at `.storybook/tsconfig.json` with the following content:
```json
Expand Down
40 changes: 20 additions & 20 deletions docs/src/pages/guides/guide-vue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Make sure that you have `vue`, `vue-loader`, `vue-template-compiler`, `@babel/co

```sh
npm install vue --save
npm install vue-loader vue-template-compiler @babel/core babel-loader babel-preset-vue --save-dev
npm install vue-loader vue-template-compiler @babel/core babel-loader babel-preset-vue --save-dev
```

## Step 2: Add a npm script
Expand Down Expand Up @@ -67,58 +67,58 @@ configure(loadStories, module);
That'll load stories in `../stories/index.js`. You can choose where to place stories, you can co-locate them with source files, or place them in an other directory.

> Requiring all your stories becomes bothersome real quick, so you can use this to load all stories matching a glob.
>
>
> <details>
> <summary>details</summary>
>
>
> ```js
> import { configure } from '@storybook/vue';
>
>
> function loadStories() {
> const req = require.context('../stories', true, /\.stories\.js$/);
> req.keys().forEach(filename => req(filename));
> }
>
>
> configure(loadStories, module);
> ```
>
>
> </details>
>
>
> You might be using global components or vue plugins such as vuex, in that case you'll need to register them in this `config.js` file.
>
>
> <details>
> <summary>details</summary>
>
>
> ```js
> import { configure } from '@storybook/vue';
>
>
> import Vue from 'vue';
>
>
> // Import Vue plugins
> import Vuex from 'vuex';
>
>
> // Import your global components.
> import Mybutton from '../src/stories/Button.vue';
>
>
> // Install Vue plugins.
> Vue.use(Vuex);
>
>
> // Register global components.
> Vue.component('my-button', Mybutton);
>
>
> function loadStories() {
> // You can require as many stories as you need.
> require('../src/stories');
> }
>
>
> configure(loadStories, module);
> ```
>
>
> This example registered your custom `Button.vue` component, installed the Vuex plugin, and loaded your Storybook stories defined in `../stories/index.js`.
>
>
> All custom components and Vue plugins should be registered before calling `configure()`.
>
>
> </details>
Expand Down

0 comments on commit e6a5195

Please sign in to comment.