Skip to content

Commit 726141e

Browse files
committed
add to docs and fix lock file
1 parent 83ea8d6 commit 726141e

File tree

3 files changed

+1569
-1551
lines changed

3 files changed

+1569
-1551
lines changed

packages/redocusaurus/Readme.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
1. Install redocusaurus:
1010

1111
```sh
12-
npm i --save redocusaurus
12+
npm i --save redocusaurus babel-plugin-styled-components@^2
1313
# OR
14-
yarn add redocusaurus
14+
yarn add redocusaurus babel-plugin-styled-components@^2
1515
```
1616

1717
1. Add it as a preset to your docusaurus config along with [@docusaurus/preset-classic](https://docusaurus.io/docs/using-plugins#docusauruspreset-classic) and pass options:
@@ -82,6 +82,15 @@
8282
};
8383
```
8484

85+
2. Add `babel-plugin-styled-components` to the plugins array of your `babel.config.js`:
86+
87+
```babel.config.js
88+
module.exports = {
89+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
90+
plugins: ['babel-plugin-styled-components']
91+
};
92+
```
93+
8594
The API Doc will be available at the route specified (`/api/` in the example above). To customize it see [full plugin options](https://redocusaurus.vercel.app/docs/getting-started/plugin-options).
8695

8796
### Options

website/docs/getting-started/Installation.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ author_url: https://rohit.page
1212
```sh
1313
npm i --save redocusaurus
1414
# OR
15-
yarn add redocusaurus
15+
yarn add redocusaurus babel-plugin-styled-components@^2
1616
```
1717

1818
1. Add it as a preset to your docusaurus config along with [@docusaurus/preset-classic](https://docusaurus.io/docs/using-plugins#docusauruspreset-classic) and pass options:
@@ -83,6 +83,15 @@ yarn add redocusaurus
8383
};
8484
```
8585

86+
2. Add `babel-plugin-styled-components` to the plugins array of your `babel.config.js`:
87+
88+
```babel.config.js
89+
module.exports = {
90+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
91+
plugins: ['babel-plugin-styled-components']
92+
};
93+
```
94+
8695
The API Doc will be available at the path specific by `route`. To skip adding a
8796
route altogether just don't set the `route` property. You will still be
8897
able to reference schema elements manually using [Schema Imports](/docs/guides/schema-imports) or create Custom React Pages using the data and theme components.

0 commit comments

Comments
 (0)