-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
125f677
commit ae99e32
Showing
29 changed files
with
363 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Getting started/Gatsby | ||
type: tutorial | ||
--- | ||
|
||
# Getting started with Gatsby | ||
|
||
## Install | ||
|
||
```sh | ||
yarn add gatsby-theme-stories | ||
``` | ||
|
||
## Configure | ||
|
||
the default options will configure `componnet-controls` to work with react apps, with `reac-docgen` for prop-types and `react-docgen-typescript` for typescript props information | ||
|
||
in `gatsby-config.js`: | ||
|
||
```js | ||
plugins: [ | ||
... | ||
{ | ||
resolve: '@component-controls/gatsby-theme-stories', | ||
options: { | ||
//path to the configuration files | ||
configPath: '.config', | ||
}, | ||
}, | ||
... | ||
], | ||
|
||
``` |
60 changes: 60 additions & 0 deletions
60
examples/stories/src/tutorial/getting-started-storybook.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Getting started/Storybook | ||
type: tutorial | ||
--- | ||
|
||
# Getting started with Storybook | ||
|
||
## Install | ||
|
||
```sh | ||
yarn add @component-controls/storybook --dev | ||
``` | ||
|
||
## Configure | ||
|
||
### Default options | ||
|
||
the default options will configure `componnet-controls` to work with react apps, with `reac-docgen` for prop-types and `react-docgen-typescript` for typescript props information | ||
|
||
in `main.js`: | ||
|
||
```js | ||
module.exports = { | ||
addons: ['@component-controls/storybook'] | ||
} | ||
``` | ||
|
||
### Use only `react-docgen` (even for typescript) | ||
|
||
Currently this is not recommended as the typescript support in `react-docgen` is a bit lagging. | ||
|
||
in `main.js`: | ||
|
||
```js | ||
module.exports = { | ||
addons: [{ | ||
name: '@component-controls/storybook', | ||
options: { | ||
webpack: ['react-docgen'], | ||
} | ||
}] | ||
} | ||
``` | ||
|
||
### Use built-in instrument for everything (not use storybook `addon-docs` at all) | ||
|
||
The following options will bypass the loaders installed by `addon-docs` and will rely only on the instrumenting loaders from `component-controls` | ||
|
||
in `main.js`: | ||
|
||
```js | ||
module.exports = { | ||
addons: [{ | ||
name: '@component-controls/storybook', | ||
options: { | ||
webpack: ['instrument', 'react-docgen-typescript'], | ||
} | ||
}] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Getting started/Vercel | ||
type: tutorial | ||
--- | ||
|
||
# Getting started with Vercel | ||
|
||
## coming soon... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.