Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky committed May 8, 2017
1 parent fe57f00 commit 287cb83
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ You can read more about common PostCSS Config [here](https://github.com/michael-
### `Config Cascade`

You can use different `postcss.config.js` files in different directories.
Config lookup starts from 'path.dirname(file)' and walks the file tree upwards until a config file is found.
Config lookup starts from `path.dirname(file)` and walks the file tree upwards until a config file is found.

```
|– components
Expand All @@ -73,7 +73,7 @@ Config lookup starts from 'path.dirname(file)' and walks the file tree upwards u
|– package.json
```

After setting up your `postcss.config.js`, add `postcss-loader` to your `webpack.config.js`. You can use it standalone or in conjunction with `css-loader` (recommended). Use it **after** `css-loader` and `style-loader`,b but **before** other preprocessor loaders like e.g `sass|less|stylus-loader`, if you use any.
After setting up your `postcss.config.js`, add `postcss-loader` to your `webpack.config.js`. You can use it standalone or in conjunction with `css-loader` (recommended). Use it **after** `css-loader` and `style-loader`, but **before** other preprocessor loaders like e.g `sass|less|stylus-loader`, if you use any.

**webpack.config.js**
```js
Expand Down Expand Up @@ -263,7 +263,7 @@ module.exports = ({ file, options, env }) => ({

Enables source map support, `postcss-loader` will use the previous source map given by other loaders and update it accordingly, if no previous loader is applied before `postcss-loader`, the loader will generate a source map for you.

:warning: If a previous loader like e.g `sass-loader` is applied and it's `sourceMap` option is set, but the `sourceMap` is omited in `postcss-loader`, the source map will be discarded by `postcss-loader` **enterily**.
> :warning: If a previous loader like e.g `sass-loader` is applied and it's `sourceMap` option is set, but the `sourceMap` option in `postcss-loader` is omitted, previous source maps will be discarded by `postcss-loader` **enterily**.
**webpack.config.js**
```js
Expand All @@ -280,7 +280,7 @@ Enables source map support, `postcss-loader` will use the previous source map gi

#### `'inline'`

You can set the `sourceMap` option to `inline` to inline the source map
You can set the `sourceMap: 'inline'` option to inline the source map
within the CSS directly as an annotation comment.

**webpack.config.js**
Expand Down Expand Up @@ -407,7 +407,7 @@ module.exports = {
fallback: 'style-loader',
use: [
{ loader: 'css-loader' options: { importLoaders: 1 } },
{ loader: 'postcss-loader', options: { plugins: [ ...plugins ] } }
'postcss-loader'
]
})
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
],
"dependencies": {
"loader-utils": "^1.x",
"schema-utils": "^0.x",
"postcss": "^6.x",
"postcss-load-config": "^1.x"
"postcss-load-config": "^1.x",
"schema-utils": "^0.x"
},
"devDependencies": {
"coveralls": "^2.x",
Expand Down
36 changes: 18 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ boom@2.x.x:
dependencies:
hoek "2.x.x"

brace-expansion@^1.0.0:
brace-expansion@^1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
dependencies:
Expand Down Expand Up @@ -2237,14 +2237,14 @@ js-tokens@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"

js-yaml@3.6.1, js-yaml@^3.4.3, js-yaml@^3.5.1:
js-yaml@3.6.1, js-yaml@^3.4.3:
version "3.6.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
dependencies:
argparse "^1.0.7"
esprima "^2.6.0"

js-yaml@^3.7.0:
js-yaml@^3.5.1, js-yaml@^3.7.0:
version "3.8.3"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.3.tgz#33a05ec481c850c8875929166fe1beb61c728766"
dependencies:
Expand Down Expand Up @@ -2580,10 +2580,10 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"

minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.0.0"
brace-expansion "^1.1.7"

minimist@0.0.8, minimist@~0.0.1:
version "0.0.8"
Expand Down Expand Up @@ -2973,7 +2973,7 @@ postcss-load-plugins@^2.3.0:
cosmiconfig "^2.1.1"
object-assign "^4.1.0"

postcss@^5.2.14, postcss@^5.2.4:
postcss@^5.2.14:
version "5.2.17"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b"
dependencies:
Expand All @@ -2982,9 +2982,9 @@ postcss@^5.2.14, postcss@^5.2.4:
source-map "^0.5.6"
supports-color "^3.2.3"

postcss@^6.x:
version "6.0.0"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.0.tgz#ef75a67e75fe2bfff53971045697202c018b2e81"
postcss@^6.0.0, postcss@^6.x:
version "6.0.1"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2"
dependencies:
chalk "^1.1.3"
source-map "^0.5.6"
Expand Down Expand Up @@ -3571,11 +3571,11 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"

sugarss@^0.x:
version "0.2.0"
resolved "https://registry.yarnpkg.com/sugarss/-/sugarss-0.2.0.tgz#ac34237563327c6ff897b64742bf6aec190ad39e"
sugarss@^1.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/sugarss/-/sugarss-1.0.0.tgz#65e51b3958432fb70d5451a68bb33e32d0cf1ef7"
dependencies:
postcss "^5.2.4"
postcss "^6.0.0"

supports-color@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -3750,8 +3750,8 @@ typical@^2.4.2, typical@^2.6.0:
resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.0.tgz#89d51554ab139848a65bcc2c8772f8fb450c40ed"

uglify-js@^2.6, uglify-js@^2.8.5:
version "2.8.22"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0"
version "2.8.23"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.23.tgz#8230dd9783371232d62a7821e2cf9a817270a8a0"
dependencies:
source-map "~0.5.1"
yargs "~3.10.0"
Expand Down Expand Up @@ -3895,8 +3895,8 @@ webpack-sources@^0.2.3:
source-map "~0.5.3"

webpack@^2.x:
version "2.5.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.5.0.tgz#5a17089f8d0e43442e606d6cf9b2a146c8ed9911"
version "2.5.1"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.5.1.tgz#61742f0cf8af555b87460a9cd8bba2f1e3ee2fce"
dependencies:
acorn "^5.0.0"
acorn-dynamic-import "^2.0.0"
Expand Down

0 comments on commit 287cb83

Please sign in to comment.