Last active
September 26, 2017 21:53
-
-
Save ryanve/8a8dea8e14fa1365f8a8f67327769ead to your computer and use it in GitHub Desktop.
postcss config example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"private": true, | |
"scripts": { | |
"css": "postcss module.css --no-map --output main.css" | |
}, | |
"devDependencies": { | |
"postcss-cli": "^4.1.1", | |
"postcss-functions": "^3.0.0", | |
"postcss-import": "^11.0.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const swatch = require("./swatch"); | |
module.exports = ctx => ({ | |
map: ctx.options.map, | |
parser: ctx.options.parser, | |
plugins: { | |
"postcss-import": { | |
root: ctx.file.dirname | |
}, | |
"postcss-functions": { | |
functions: { swatch } | |
}, | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment