You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Configuration.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ By default, Styleguidist will look for `styleguide.config.js` file in your proje
56
56
57
57
Type: `String` or `Array`, optional
58
58
59
-
Your application static assets folder, will be accessible as `/` in the style guide dev server.
59
+
Your application static assets folder will be accessible as `/` in the style guide dev server.
60
60
61
61
#### `compilerConfig`
62
62
@@ -439,13 +439,13 @@ module.exports = {
439
439
440
440
Type: `Number`, default: 500
441
441
442
-
Debounce time in milliseconds used before render the changes from the editor. While typing code the preview will not be updated.
442
+
Debounce time in milliseconds used before rendering the changes from the editor. While typing code the preview will not be updated.
443
443
444
444
#### `propsParser`
445
445
446
446
Type: `Function`, optional
447
447
448
-
Function that allows you to override the mechanism used to parse props from a source file. Default mechanism is using [react-docgen](https://github.com/reactjs/react-docgen) to parse props.
448
+
Function that allows you to override the mechanism used to parse props from a source file. The default mechanism is using [react-docgen](https://github.com/reactjs/react-docgen) to parse props.
449
449
450
450
```javascript
451
451
module.exports= {
@@ -521,7 +521,7 @@ module.exports = {
521
521
}
522
522
```
523
523
524
-
Use [theme](#theme) config option to change ribbon style.
524
+
Use the [theme](#theme) config option to change ribbon style.
525
525
526
526
#### `sections`
527
527
@@ -547,7 +547,7 @@ Dev server port.
547
547
548
548
Type: `Boolean`, default: `true`
549
549
550
-
Toggle sidebar visibility. Sidebar will be hidden when opening components or examples in isolation mode even if this value is set to `true`. When set to `false`, sidebar will always be hidden.
550
+
Toggle sidebar visibility. The sidebar will be hidden when opening components or examples in isolation mode even if this value is set to `true`. When set to `false`, the sidebar will always be hidden.
551
551
552
552
#### `skipComponentsWithoutExample`
553
553
@@ -688,7 +688,7 @@ export default
688
688
689
689
Type: `Function`, optional
690
690
691
-
Function that modifies code example (Markdown fenced code block). For example you can use it to load examples from files:
691
+
Function that modifies code example (Markdown fenced code block). For example, you can use it to load examples from files:
Copy file name to clipboardExpand all lines: docs/Cookbook.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
-[How to change style guide dev server logs output?](#how-to-change-style-guide-dev-server-logs-output)
20
20
-[How to debug my components and examples?](#how-to-debug-my-components-and-examples)
21
21
-[How to debug the exceptions thrown from my components?](#how-to-debug-the-exceptions-thrown-from-my-components)
22
-
-[How to use production or development build of React?](#how-to-use-production-or-development-build-of-react)
22
+
-[How to use the production or development build of React?](#how-to-use-the-production-or-development-build-of-react)
23
23
-[Why object references don’t work in example component state?](#why-object-references-dont-work-in-example-component-state)
24
24
-[How to use Vagrant with Styleguidist?](#how-to-use-vagrant-with-styleguidist)
25
25
-[How to add a favicon?](#how-to-add-a-favicon)
@@ -68,7 +68,7 @@ module.exports = {
68
68
69
69
## How to hide some components in style guide but make them available in examples?
70
70
71
-
Enable [skipComponentsWithoutExample](Configuration.md#skipcomponentswithoutexample) option and do not add example file (`Readme.md` by default) to components you want to ignore.
71
+
Enable [skipComponentsWithoutExample](Configuration.md#skipcomponentswithoutexample) option and do not add an example file (`Readme.md` by default) to components you want to ignore.
72
72
73
73
Import these components in your examples:
74
74
@@ -270,9 +270,9 @@ module.exports = {
270
270
271
271
You can replace any Styleguidist React component. But in most of the cases you’ll want to replace `*Renderer` components — all HTML is rendered by these components. For example `ReactComponentRenderer`, `ComponentsListRenderer`, `PropsRenderer`, etc. — [check the source](https://github.com/styleguidist/react-styleguidist/tree/master/src/client/rsg-components) to see what components are available.
272
272
273
-
There’s also a special wrapper component — `Wrapper` — that wraps every example component. By default it just renders `children` as is but you can use it to provide a custom logic.
273
+
There’s also a special wrapper component — `Wrapper` — that wraps every example component. By default, it just renders `children` as is but you can use it to provide custom logic.
274
274
275
-
For example you can replace the `Wrapper` component to wrap any example in the [React Intl’s](https://github.com/yahoo/react-intl) provider component. You can’t wrap the whole style guide because every example is compiled separately in a browser.
275
+
For example, you can replace the `Wrapper` component to wrap any example in the [React Intl’s](https://github.com/yahoo/react-intl) provider component. You can’t wrap the whole style guide because every example is compiled separately in a browser.
276
276
277
277
```javascript
278
278
// styleguide.config.js
@@ -401,9 +401,9 @@ module.exports = {
401
401
2. Press the  button in your browser’s developer tools.
402
402
3. Press the  button and the debugger will stop execution at the next exception.
403
403
404
-
## How to use production or development build of React?
404
+
## How to use the production or development build of React?
405
405
406
-
In some cases, you might need to use development build of React instead of the default [production one](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build). For example, this might be needed if you use React Native and make references to a React Native component’s PropTypes in your code. As React removes all PropTypes in its production build, your code will fail. By default, Styleguidist uses the development build for the dev server, and the production one for static builds.
406
+
In some cases, you might need to use the development build of React instead of the default [production one](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build). For example, this might be needed if you use React Native and make references to a React Native component’s PropTypes in your code. As React removes all PropTypes in its production build, your code will fail. By default, Styleguidist uses the development build for the dev server and the production one for static builds.
407
407
408
408
```js
409
409
importReactfrom'react'
@@ -452,7 +452,7 @@ initialState = {
452
452
453
453
## How to use Vagrant with Styleguidist?
454
454
455
-
First read [Vagrant guide](https://webpack.js.org/guides/development-vagrant/) from the webpack documentation. Then enable polling in your webpack config:
455
+
First, read [Vagrant guide](https://webpack.js.org/guides/development-vagrant/) from the webpack documentation. Then enable polling in your webpack config:
456
456
457
457
```js
458
458
devServer: {
@@ -503,7 +503,7 @@ module.exports = {
503
503
}
504
504
```
505
505
506
-
In comparison to [require](Configuration.md#require) option, these scripts and links are run in the browser, not during webpack build process. It can be useful for side effect-causing scripts which your components, or in this case Babel output, need to function properly.
506
+
In comparison to [require](Configuration.md#require) option, these scripts and links are run in the browser, not during webpack build process. It can be useful for side effect-causing scripts in which your components, or in this case Babel output, need to function properly.
507
507
508
508
## How to add fonts from Google Fonts?
509
509
@@ -539,7 +539,7 @@ See [working with third-party libraries](Thirdparties.md).
539
539
540
540
## How to change the names of components displayed in Styleguidist UI?
541
541
542
-
You might want to change your components’ names to be displayed differently, for example, for stylistic purposes or to give them a more descriptive names in your style guide.
542
+
You might want to change your components’ names to be displayed differently, for example, for stylistic purposes or to give them more descriptive names in your style guide.
543
543
544
544
This can be done by adding [@visibleName](Documenting.md#defining-custom-component-names) tag to your component documentation.
545
545
@@ -558,7 +558,7 @@ module.exports = {
558
558
559
559
## What’s the difference between Styleguidist and Storybook?
560
560
561
-
Both tools are good and mature, they have many similarities but also some distinctions that may make you choose one or the other. For me the biggest distinction is how you describe component variations.
561
+
Both tools are good and mature, they have many similarities but also some distinctions that may make you choose one or the other. For me, the biggest distinction is how you describe component variations.
562
562
563
563
With [Storybook](https://storybook.js.org/) you write _stories_ in JavaScript files:
Copy file name to clipboardExpand all lines: docs/Development.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
15
15
_For basics see [How to contribute](https://github.com/styleguidist/react-styleguidist/blob/master/.github/Contributing.md)._
16
16
17
-
Styleguidist isn’t an ordinary singlepage app and some design decisions may look confusing to an outsider. In this guide we’ll explain these decisions to un-confuse potential contributors.
17
+
Styleguidist isn’t an ordinary single-page app and some design decisions may look confusing to an outsider. In this guide, we’ll explain these decisions to un-confuse potential contributors.
18
18
19
19
The main thing is that we’re running two apps at the same time: user’s components and Styleguidist UI. They share a webpack configuration and have styles in the same scope (there’s only one scope in CSS). And we can control only one of these two apps: Styleguidist UI. That puts us under some restrictions:
20
20
@@ -38,9 +38,9 @@ We use webpack loaders to hot reload the style guide on changes in user componen
38
38
-`props-loaders`: loads props documentation using react-docgen;
39
39
-`examples-loader`: loads examples from Markdown files;
40
40
41
-
Styleguidist tries to load and reuse user’s webpack config (`webpack.config.js` in project root folder). It works most of the time but has some restrictions: Styleguidist [ignores](https://github.com/styleguidist/react-styleguidist/blob/master/src/scripts/utils/mergeWebpackConfig.js) some fields and plugins because they are already included (like `webpack.HotModuleReplacementPlugin`), don’t make sense for a style guide (like `output`) or may break Styleguidist (like `entry`).
41
+
Styleguidist tries to load and reuse the user’s webpack config (`webpack.config.js` in project root folder). It works most of the time but has some restrictions: Styleguidist [ignores](https://github.com/styleguidist/react-styleguidist/blob/master/src/scripts/utils/mergeWebpackConfig.js) some fields and plugins because they are already included (like `webpack.HotModuleReplacementPlugin`), don’t make sense for a style guide (like `output`) or may break Styleguidist (like `entry`).
42
42
43
-
We’re trying to keep Styleguidist’s own [webpack config](https://github.com/styleguidist/react-styleguidist/blob/master/src/scripts/make-webpack-config.js) minimal to reduce clashes with user’s configuration.
43
+
We’re trying to keep Styleguidist’s [webpack config](https://github.com/styleguidist/react-styleguidist/blob/master/src/scripts/make-webpack-config.js) minimal to reduce clashes with the user’s configuration.
44
44
45
45
## React components
46
46
@@ -74,7 +74,7 @@ Each component folder usually has several files:
74
74
75
75
## Styles
76
76
77
-
For styles we use [JSS](http://cssinjs.org/), it allows users to customize their style guide and allows us to ensure styles isolations (thanks to [jss-isolate](http://cssinjs.org/jss-isolate/)). No user styles should affect Styleguidist UI and no Styleguidist styles should affect user components.
77
+
For styles we use [JSS](http://cssinjs.org/), it allows users to customize their style guide and allows us to ensure style isolation (thanks to [jss-isolate](http://cssinjs.org/jss-isolate/)). No user styles should affect Styleguidist UI and no Styleguidist styles should affect user components.
78
78
79
79
Use [clsx](https://github.com/lukeed/clsx) to merge several class names or for conditional class names, import it as `cx` (`import cx from 'clsx'`).
Styleguidist will look for any `Readme.md` or `ComponentName.md` files in the component’s folder and display them. Any code block with a language tag of `js`, `jsx` or `javascript` will be rendered as a React component with an interactive playground. For backwards compatibility, code blocks without a language tag are also rendered in this way. It is recommended to always use the proper language tag for new documentation.
59
+
Styleguidist will look for any `Readme.md` or `ComponentName.md` files in the component’s folder and display them. Any code block with a language tag of `js`, `jsx`, or `javascript` will be rendered as a React component with an interactive playground. For backwards compatibility, code blocks without a language tag are also rendered in this way. It is recommended to always use the proper language tag for new documentation.
60
60
61
61
React component example:
62
62
@@ -92,7 +92,7 @@ Styleguidist will look for any `Readme.md` or `ComponentName.md` files in the co
92
92
93
93
> **Note:** You can configure examples file name with the [getExampleFilename](Configuration.md#getexamplefilename) option.
94
94
95
-
> **Note:** If you need to display some JavaScript code in your documentation that you don’t want rendered as an interactive playground you can use the `static` modifier with a language tag (e.g. `js static`).
95
+
> **Note:** If you need to display some JavaScript code in your documentation that you don’t want to be rendered as an interactive playground you can use the `static` modifier with a language tag (e.g. `js static`).
96
96
97
97
## External examples using doclet tags
98
98
@@ -131,7 +131,7 @@ insertAtCursor(text) {
131
131
132
132
## Ignoring props
133
133
134
-
By default, all props your components have are considered to be public and are published. In some rare cases you might want to remove a prop from the documentation while keeping it in the code. To do so, mark the prop with JSDoc [`@ignore`](http://usejsdoc.org/tags-ignore.html) tag to remove it from the docs:
134
+
By default, all props your components have are considered to be public and are published. In some rare cases, you might want to remove a prop from the documentation while keeping it in the code. To do so, mark the prop with JSDoc [`@ignore`](http://usejsdoc.org/tags-ignore.html) tag to remove it from the docs:
135
135
136
136
```javascript
137
137
MyComponent.propTypes= {
@@ -157,7 +157,7 @@ Use `@visibleName` JSDoc tag to define component names that are used in the Styl
157
157
classButtonextendsReact.Component {
158
158
```
159
159
160
-
The component will be displayed with a custom “The Best Button Ever 🐙” name and this will not change the name of the component used in code of your app or Styleguidist examples.
160
+
The component will be displayed with a custom “The Best Button Ever 🐙” name and this will not change the name of the component used in the code of your app or Styleguidist examples.
Copy file name to clipboardExpand all lines: docs/Maintenance.md
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,10 @@
10
10
-[Releases](#releases)
11
11
-[Patch releases](#patch-releases)
12
12
-[Minor and major releases](#minor-and-major-releases)
13
-
-[Change logs](#change-logs)
14
-
-[What is a good change log](#what-is-a-good-change-log)
15
-
-[What should be in a change log](#what-should-be-in-a-change-log)
16
-
-[Preparing a change log](#preparing-a-change-log)
13
+
-[Changelogs](#changelogs)
14
+
-[What is a good changelog](#what-is-a-good-changelog)
15
+
-[What should be in a changelog](#what-should-be-in-a-changelog)
16
+
-[Preparing a changelog](#preparing-a-changelog)
17
17
18
18
<!-- tocstop -->
19
19
@@ -50,38 +50,38 @@ Patch releases are fully automated — any commit of a `Fix` type is published a
50
50
51
51
### Minor and major releases
52
52
53
-
We’re using [milestones](https://github.com/styleguidist/react-styleguidist/milestones) to group approved pull requests that should be released together. Minor and major releases require a change log (see below). Any commit of a `Feat` type will not trigger a release until you commit a change log. Semantic-release will publish a major release, if there are any commits with [breaking changes](https://github.com/tamiadev/semantic-release-tamia/blob/master/Convention.md#breaking-changes).
53
+
We’re using [milestones](https://github.com/styleguidist/react-styleguidist/milestones) to group approved pull requests that should be released together. Minor and major releases require a changelog (see below). Any commit of a `Feat` type will not trigger a release until you commit a changelog. Semantic-release will publish a major release if there are any commits with [breaking changes](https://github.com/tamiadev/semantic-release-tamia/blob/master/Convention.md#breaking-changes).
54
54
55
55
1. Merge all pull request from a milestone
56
56
2. Resolve possible merge conflicts.
57
-
3. Manually check that Styleguidist is still works.
58
-
4. Prepare and commit a change log.
57
+
3. Manually check that Styleguidist still works.
58
+
4. Prepare and commit a changelog.
59
59
5. Wait until semantic-release publishes the release.
60
60
6. Tweet the release!
61
61
62
-
## Change logs
62
+
## Changelogs
63
63
64
-
### What is a good change log
64
+
### What is a good changelog
65
65
66
-
-Change logs are written for users, not developers.
67
-
-Change log should show new features with code examples or GIFs.
68
-
-Change log should make all breaking changes clear.
69
-
-Change log should explain how to migrate to a new versions if there are breaking changes.
70
-
- Commit log **is not** a change log.
66
+
-Changelogs are written for users, not developers.
67
+
-Changelog should show new features with code examples or GIFs.
68
+
-Changelog should make all breaking changes clear.
69
+
-Changelog should explain how to migrate to a new version if there are breaking changes.
70
+
- Commit log **is not** a changelog.
71
71
72
-
Here’s a [good example of a change log](https://github.com/styleguidist/react-styleguidist/releases/tag/v7.1.0). Check out [Keep a Changelog](https://keepachangelog.com/) for more details on good change logs.
72
+
Here’s a [good example of a changelog](https://github.com/styleguidist/react-styleguidist/releases/tag/v7.1.0). Check out [Keep a Changelog](https://keepachangelog.com/) for more details on good changelogs.
73
73
74
-
### What should be in a change log
74
+
### What should be in a changelog
75
75
76
76
- Information about pull request authors:<br> `(#1040 by @rafaesc)`
77
77
- Open Collective link at the very top:<br> `👋 **[Support Styleguidist](https://opencollective.com/styleguidist) on Open Collective** 👋`
78
78
79
-
### Preparing a change log
79
+
### Preparing a changelog
80
80
81
81
1. Change to the `master` branch.
82
-
2. Generate a change log draft using [tamia-changelog](https://github.com/tamiadev/tamia-changelog): `npx tamia-changelog`
82
+
2. Generate a changelog draft using [tamia-changelog](https://github.com/tamiadev/tamia-changelog): `npx tamia-changelog`.
83
83
3. Edit `Changelog.md` file.
84
-
4. Commit the change log: `npx tamia-changelog commit`.
84
+
4. Commit the changelog: `npx tamia-changelog commit`.
85
85
86
86
**Note:** do not commit the `Changelog.md` file, the release tool reads the changelog from the commit message. [Read how it works](https://blog.sapegin.me/all/semantic-release/).
0 commit comments