Last active
July 4, 2016 10:09
-
-
Save nkt/10a1c931a420360fc4bb5e2482663e05 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 postcss = require('postcss'); | |
const defaultOptions = { | |
bundler: null, | |
browsers: 'Chrome >= 45, ff >= 40, ie >= 10, Safari >= 8' | |
}; | |
const plugin = postcss.plugin('postcss-dialog', (_options) => { | |
const options = Object.assign(defaultOptions, _options); | |
const plugins = [ | |
require('postcss-import')({ | |
addDependencyTo: options.bundler | |
}), | |
require('postcss-cssnext')({ | |
browsers: options.browsers | |
}) | |
]; | |
return postcss(plugins); | |
}); | |
module.exports = plugin; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment