postcss-modules-extract-imports
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/postcss-modules-extract-imports package

0.0.1 • Public • Published

CSS Modules: Extract Imports

Transforms:

:local(.continueButton) {
  extends: button from "library/button.css";
  background: red;
}

into:

:import("library/button.css") {
  button: __tmp_487387465fczSDGHSABb;
}
:local(.continueButton) {
  extends: __tmp_487387465fczSDGHSABb;
  background: red;
}

Specification

  • Only a certain whitelist of properties are inspected. Currently, that whitelist is ['extends'] alone.
  • An extend-import has the following format:
extends: className [... className] from "path/to/file.css";

Building

npm install
npm build
npm test

Development

  • npm watch will watch index.src.js for changes and rebuild
  • npm autotest will watch index.src.js and test.js for changes and retest

License

ISC

With thanks

  • Mark Dalgleish
  • Tobias Koppers
  • Guy Bedford

Glen Maddern, 2015.

Package Sidebar

Install

npm i postcss-modules-extract-imports@0.0.1

Version

0.0.1

License

ISC

Last publish

Collaborators

  • markdalgleish
  • sokra
  • geelen
  • evilebottnawi