From 0fe8b08ccf9e40e56cccb44dcadc57d0ea06b601 Mon Sep 17 00:00:00 2001 From: y-gagar1n Date: Sat, 14 Jul 2018 13:19:19 +0300 Subject: [PATCH 1/3] clarify 'path' option description in docs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3465703..d818c543 100644 --- a/README.md +++ b/README.md @@ -137,14 +137,14 @@ If you use JS styles without the [`postcss-js`][postcss-js] parser, add the `exe |Name|Type|Default|Description| |:--:|:--:|:-----:|:----------| -|[`path`](#path)|`{String}`|`undefined`|PostCSS Config Path| +|[`path`](#path)|`{String}`|`undefined`|PostCSS Config Directory| |[`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. -> ⚠️ Otherwise it is **unnecessary** to set this option and is **not** recommended +> ⚠️ Otherwise it is **unnecessary** to set this option and is **not** recommended. You **can't** set other name for **postcss.config.js**, this option only allows you to specify the folder where it will be looked for. **webpack.config.js** ```js From c868dd09c02b56daf45bd8a84bead04345f981e5 Mon Sep 17 00:00:00 2001 From: y-gagar1n Date: Sun, 15 Jul 2018 11:26:37 +0300 Subject: [PATCH 2/3] fixes after review --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d818c543..38a012a6 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ If you use JS styles without the [`postcss-js`][postcss-js] parser, add the `exe 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. -> ⚠️ Otherwise it is **unnecessary** to set this option and is **not** recommended. You **can't** set other name for **postcss.config.js**, this option only allows you to specify the folder where it will be looked for. +> ⚠️ Note that you **can't** use a **filename** other than the [supported config formats] (e.g `.postcssrc.js`, `postcss.config.js`), this option only allows you to manually specify the **directory** where config lookup should **start** from **webpack.config.js** ```js @@ -152,12 +152,15 @@ You can manually specify the path to search for your config (`postcss.config.js` loader: 'postcss-loader', options: { config: { - path: 'path/to/postcss.config.js' + path: 'path/to/.config/' ✅ + path: 'path/to/.config/css.config.js' ❌ } } } ``` +[supported config formats]: https://github.com/michael-ciniawsky/postcss-load-config#usage + #### `Context (ctx)` |Name|Type|Default|Description| From 5e3aa5dfc1bf428b6d0a2552dbe0b79e3bff8db1 Mon Sep 17 00:00:00 2001 From: Yury Timofeev Date: Mon, 16 Jul 2018 10:33:21 +0300 Subject: [PATCH 3/3] fix after review --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 38a012a6..b53e640b 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,8 @@ If you use JS styles without the [`postcss-js`][postcss-js] parser, add the `exe 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. +> ⚠️ Otherwise it is **unnecessary** to set this option and is **not** recommended + > ⚠️ Note that you **can't** use a **filename** other than the [supported config formats] (e.g `.postcssrc.js`, `postcss.config.js`), this option only allows you to manually specify the **directory** where config lookup should **start** from **webpack.config.js**