Skip to content

docs(README): add option types && links #303

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

Merged
merged 1 commit into from
Oct 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npm i -D postcss-loader

<h2 align="center">Usage</h2>

### `Config`
### `Configuration`

**postcss.config.js**
```js
Expand Down Expand Up @@ -108,15 +108,15 @@ module.exports = {

<h2 align="center">Options</h2>

|Name|Default|Description|
|:--:|:-----:|:----------|
|`exec`|`undefined`|Enable PostCSS Parser support in `CSS-in-JS`|
|`parser`|`undefined`|Set PostCSS Parser|
|`syntax`|`undefined`|Set PostCSS Syntax|
|`stringifier`|`undefined`|Set PostCSS Stringifier|
|`config`|`undefined`|Set `postcss.config.js` config path && `ctx`|
|`plugins`|`[]`|Set PostCSS Plugins|
|`sourceMap`|`false`|Enable Source Maps|
|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|[`exec`](#exec)|`{Boolean}`|`undefined`|Enable PostCSS Parser support in `CSS-in-JS`|
|[`parser`](#syntaxes)|`{String\|Object}`|`undefined`|Set PostCSS Parser|
|[`syntax`](#syntaxes)|`{String\|Object}`|`undefined`|Set PostCSS Syntax|
|[`stringifier`](#syntaxes)|`{String\|Object}`|`undefined`|Set PostCSS Stringifier|
|[`config`](#config)|`{Object}`|`undefined`|Set `postcss.config.js` config path && `ctx`|
|[`plugins`](#plugins)|`{Array\|Function}`|`[]`|Set PostCSS Plugins|
|[`sourceMap`](#sourceMap)|`{String\|Boolean}`|`false`|Enable Source Maps|

### `Exec`

Expand All @@ -135,6 +135,11 @@ If you use JS styles without the [`postcss-js`][postcss-js] parser, add the `exe

### `Config`

|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|[`path`](#path)|`{String}`|`undefined`|PostCSS Config Path|
|[`context`](#context)|`{Object}`|`undefined`|PostCSS Config Context|

#### `Path`

You can manually specify the path to search for your config (`postcss.config.js`) with the `config.path` option. This is needed if you store your config in a separate e.g `./config || ./.config` folder.
Expand Down Expand Up @@ -216,9 +221,9 @@ module.exports = ({ file, options, env }) => ({

|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|`syntax`|`{String\|Function}`|`undefined`|Custom PostCSS Syntax|
|`parser`|`{String\|Function}`|`undefined`|Custom PostCSS Parser|
|`stringifier`|`{String\|Function}`|`undefined`|Custom PostCSS Stringifier|
|[`parser`](#parser)|`{String\|Function}`|`undefined`|Custom PostCSS Parser|
|[`syntax`](#syntax)|`{String\|Function}`|`undefined`|Custom PostCSS Syntax|
|[`stringifier`](#stringifier)|`{String\|Function}`|`undefined`|Custom PostCSS Stringifier|

#### `Parser`

Expand Down