postcss-handy-import

- Places imports at the top of a file.
- Removes duplicates
Example
// input.css
@import 'util/variables';
.header {
color: red;
}
@import 'layout/header',
"layout/footer",
«util/variables»;
.footer {
color: green;
}
@import 'util/mixins' util/variables;
// output.css
@import 'util/variables';
@import 'layout/header';
@import 'layout/footer';
@import 'util/mixins';
.header {
color: red;
}
.footer {
color: green;
}
Installation
$ npm install postcss-handy-imports
Usage
postcss([ require('postcss-handy-imports')(options) ])