Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(editor): Passes all codeMirror options to editor #662

Merged
merged 29 commits into from
Dec 19, 2017
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
12d041c
feat(editor): Passes all codeMirror options to editot
SaraVieira Oct 31, 2017
6737194
rename to editorconfig
SaraVieira Nov 9, 2017
721d992
add deprecated prop
SaraVieira Nov 12, 2017
53af58c
removed added option in config
SaraVieira Nov 12, 2017
5ed3350
fix tests
SaraVieira Nov 12, 2017
d9de7d9
Revert "fix tests"
sapegin Nov 13, 2017
0eabb99
Fix: Revert deprecate option changes
sapegin Nov 13, 2017
707404f
Fix: Tweak text
sapegin Nov 13, 2017
b1436d8
Fix: Make all warnings yellow again
sapegin Nov 13, 2017
5ff5199
fix: remove duplicated
SaraVieira Dec 18, 2017
d812a14
fic: fix tests
SaraVieira Dec 18, 2017
cb0c2ed
fix: remove duplicated
SaraVieira Dec 18, 2017
478b151
fix: move to defaults
SaraVieira Dec 18, 2017
ee90b84
update tests
SaraVieira Dec 18, 2017
e1496dc
fix: move to defaults
SaraVieira Dec 18, 2017
fbd4f39
fix: add config tests
SaraVieira Dec 18, 2017
5600c74
fix duplocation
SaraVieira Dec 18, 2017
baa9d2e
move to consts
SaraVieira Dec 18, 2017
8f2640b
change tests
SaraVieira Dec 19, 2017
55e334b
remove jest-cli
SaraVieira Dec 19, 2017
4e78ba4
change tests name
SaraVieira Dec 19, 2017
364f267
revert package-lock
SaraVieira Dec 19, 2017
8c0d54c
update package-lock
SaraVieira Dec 19, 2017
ed20e8c
update lock
SaraVieira Dec 19, 2017
1b7677a
Update package-lock.json
SaraVieira Dec 19, 2017
b74188a
add docs
SaraVieira Dec 19, 2017
87efdde
Merge branch '648' of github.com:styleguidist/react-styleguidist into…
SaraVieira Dec 19, 2017
477ab67
update docs
SaraVieira Dec 19, 2017
1c158fc
change to master
SaraVieira Dec 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 7 additions & 18 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ By default, Styleguidist will look for `styleguide.config.js` file in your proje
* [`configureServer`](#configureserver)
* [`dangerouslyUpdateWebpackConfig`](#dangerouslyupdatewebpackconfig)
* [`defaultExample`](#defaultexample)
* [`editorConfig`](#editorConfig)
* [`getComponentPathLine`](#getcomponentpathline)
* [`getExampleFilename`](#getexamplefilename)
* [`handlers`](#handlers)
* [`editorConfig`](#editorConfig)
* [`ignore`](#ignore)
* [`logger`](#logger)
* [`previewDelay`](#previewdelay)
Expand Down Expand Up @@ -168,6 +168,12 @@ module.exports = {
}
```

#### `editorConfig`

Type: `Object`, default: [scripts/schemas/config.js](https://github.com/styleguidist/react-styleguidist/blob/87efdde2d52209e9c4072368402d11030943d69f/scripts/schemas/config.js#L101)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to point to master in case we change the options.


Source code editor options, see [CodeMirror docs](https://codemirror.net/doc/manual.html#config) for all available options.

#### `getExampleFilename`

Type: `Function`, default: finds `Readme.md` or `ComponentName.md` in the component folder
Expand Down Expand Up @@ -227,23 +233,6 @@ module.exports = {
}
```

#### `editorConfig`

Type: `Object`, default:
```
{
theme: 'base16-light',
mode: 'jsx',
lineWrapping: true,
smartIndent: false,
matchBrackets: true,
viewportMargin: Infinity,
lineNumbers: false,
}
```

This will determine how your editor looks, you can check [here](https://codemirror.net/doc/manual.html#config) all the available options

#### `ignore`

Type: `String[]`, default: `['**/__tests__/**', '**/*.test.js', '**/*.test.jsx', '**/*.spec.js', '**/*.spec.jsx']`
Expand Down