postcss-modules-extract-imports
A CSS Modules transform to extract local aliases for inline imports
Last updated 9 years ago by geelen .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install postcss-modules-extract-imports 
SYNC missed versions from official npm registry.

CSS Modules: Extract Imports

Build Status

Transforms:

:local(.continueButton) {
  composes: button from "library/button.css";
  color: green;
}

into:

:import("library/button.css") {
  button: __tmp_487387465fczSDGHSABb;
}
:local(.continueButton) {
  composes: __tmp_487387465fczSDGHSABb;
  color: 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",  className [... className], className [... className] from global;

Options

  • failOnWrongOrder bool generates exception for unpredictable imports order.
.aa {
  composes: b from "./b.css";
  composes: c from "./c.css";
}

.bb {
  /* "b.css" should be before "c.css" in this case */
  composes: c from "./c.css";
  composes: b from "./b.css";
}

Building

npm install
npm test

Build Status

  • Lines: Coverage Status
  • Statements: codecov.io

License

ISC

With thanks

  • Mark Dalgleish
  • Tobias Koppers
  • Guy Bedford

Glen Maddern, 2015.

Current Tags

  • 1.0.0-beta1                                ...           beta (9 years ago)
  • 3.1.0                                ...           latest (9 months ago)
  • 3.0.0-rc.3                                ...           next (4 years ago)

19 Versions

  • 3.1.0                                ...           9 months ago
  • 3.0.0                                ...           4 years ago
  • 3.0.0-rc.3                                ...           4 years ago
  • 3.0.0-rc.1                                ...           4 years ago
  • 3.0.0-rc.0                                ...           4 years ago
  • 2.0.0                                ...           6 years ago
  • 1.2.1                                ...           6 years ago
  • 1.2.0                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 1.0.0-beta2                                ...           9 years ago
  • 0.0.6                                ...           9 years ago
  • 1.0.0-beta1                                ...           9 years ago
  • 0.0.5                                ...           10 years ago
  • 0.0.4                                ...           10 years ago
  • 0.0.3                                ...           10 years ago
  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           10 years ago
Maintainers (1)
Downloads
Total 15
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (9)

© 2010 - cnpmjs.org x YWFE | Home | YWFE