.. | ||
src | ||
CHANGELOG.md | ||
LICENSE | ||
package.json | ||
README.md |
CSS Modules: Extract Imports
Transforms:
:local(.continueButton) {
: button from "library/button.css";
composescolor: green;
}
into:
:import("library/button.css") {
: __tmp_487387465fczSDGHSABb;
button
}:local(.continueButton) {
: __tmp_487387465fczSDGHSABb;
composescolor: green;
}
Specification
- Only a certain whitelist of properties are inspected. Currently,
that whitelist is
['composes']
alone. - An extend-import has the following format:
composes: className [... className] from "path/to/file.css";
Options
failOnWrongOrder
bool
generates exception for unpredictable imports order.
.aa {
: b from "./b.css";
composes: c from "./c.css";
composes
}
.bb {
/* "b.css" should be before "c.css" in this case */
: c from "./c.css";
composes: b from "./b.css";
composes }
Building
npm install
npm test
License
ISC
With thanks
- Mark Dalgleish
- Tobias Koppers
- Guy Bedford
Glen Maddern, 2015.