diff --git a/README.md b/README.md index 41854f3..f2284a5 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,15 @@ It's also possible to pass the config as object to avoid any file resolution. ## Migration +### coming from 2.x + +PostCSS has been updated to 8.x (which is the minimum required version now) and is no longer packaged with this plugin but has become a peer dependency. +What does this mean for you? If you're using npm >= v7 it's automatically installed, otherwise you need to install it yourself. + +```bash +npm install postcss --save-dev +``` + ### coming from 1.x Both options, `combine` and `minimize`, have been removed in v2 because the plugin parses your `postcss.config.js` now and applies all subsequent plugins to the extracted files as well. @@ -181,7 +190,7 @@ Both options, `combine` and `minimize`, have been removed in v2 because the plug So if you have used them you simply need to install appropriate PostCSS plugins (see below for example) and add them to your PostCSS config. ```bash -npm install postcss-combine-media-query cssnano --save-dev +npm install postcss postcss-combine-media-query cssnano --save-dev ``` ```javascript diff --git a/index.js b/index.js index 179cb41..0245318 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const _ = require('lodash'); const fs = require('fs'); const path = require('path'); -const { green, yellow } = require('kleur'); +const { green } = require('kleur'); const postcss = require('postcss'); const SubsequentPlugins = require('./subsequent-plugins'); @@ -26,31 +26,6 @@ module.exports = (opts) => { plugins.updateConfig(opts.config); } - // Deprecation warnings - // TODO: remove in future - if (typeof opts.whitelist === 'boolean') { - console.log( - yellow('[WARNING] whitelist option is deprecated – please use extractAll') - ); - if (opts.whitelist === true) { - opts.extractAll = false; - } - } - if (opts.combine) { - console.log( - yellow( - '[WARNING] combine option is deprecated – please use another plugin for this' - ) - ); - } - if (opts.minimize) { - console.log( - yellow( - '[WARNING] minimize option is deprecated – please use another plugin for this' - ) - ); - } - const media = {}; function addMedia(key, css, query) {