Skip to content

Commit

Permalink
feat: allow for a custom postcss version to be passed (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens authored Jul 6, 2021
1 parent 727230c commit 3bbfe3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"peerDependencies": {
"postcss": "^8.2.2"
},
"peerDependenciesMeta": {
"postcss": {
"optional": true
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const postcss = require('postcss');
const createSimplePreset = require('cssnano-preset-simple');

module.exports = (opts = {}) => {
module.exports = (opts = {}, postcss = require('postcss')) => {
const excludeAll = Boolean(opts && opts.excludeAll);

const userOpts = Object.assign({}, opts);
Expand Down

0 comments on commit 3bbfe3b

Please sign in to comment.