No description, website, or topics provided.
JavaScript
Latest commit 53ece4a Sep 22, 2015 @geelen bump dep too
Permalink
Failed to load latest commit information.
.gitignore added dependency on jspm-loader-css Jun 2, 2015
README.md added readme Jun 2, 2015
index.js adding values to the chain Sep 22, 2015
package.json bump dep too Sep 22, 2015

README.md

JSPM Loader: CSS Modules

A CSS Modules loader for JSPM

Install the plugin and name it css locally

jspm install css=npm:jspm-loader-css-modules

Write some CSS Modules:

/* component.css */
.myComponent {
  extends: redBackground from "./backgrounds.css";
  color: white;
}
/* backgrounds.css */
.redBackground {
  background-color: red;
}

and use them in your JS:

import styles from './component.css!'
elem.innerHTML = `<div class="${styles.myComponent}"></div>`

The following CSS is generated:

._path_to_backgrounds__redBackground { background-color: red; }
._path_to_component__myComponent { color: white; }

And the styles variable returns

{
  "myComponent": "_path_to_backgrounds__redBackground _path_to_component__myComponent"
}

For the opt-in version, using :local to declare exported classnames, use the default JSPM CSS Loader instead.