postcss-modules-extract-imports
A CSS Modules transform to extract local aliases for inline imports
Last updated 11 days ago by evilebottnawi .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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";

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 (5 years ago)
  • 3.0.0                                ...           latest (11 days ago)
  • 3.0.0-rc.3                                ...           next (12 days ago)

18 Versions

  • 3.0.0                                ...           11 days ago
  • 3.0.0-rc.3                                ...           12 days ago
  • 3.0.0-rc.1                                ...           a month ago
  • 3.0.0-rc.0                                ...           a month ago
  • 2.0.0                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           5 years ago
  • 1.0.0-beta2                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 1.0.0-beta1                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Downloads
Today 2,264
This Week 194,570
This Month 539,447
Last Day 34,720
Last Week 211,746
Last Month 935,954
Dependencies (0)
None
Dev Dependencies (8)
Dependents (122)

Copyright 2014 - 2016 © taobao.org |