Skip to content

joshgillies/css-modules-require-hook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

css-modules-require-hook

Automatically compiles a CSS Module to a low-level interchange format called ICSS or Interoperable CSS.

One of the ways you can compile CSS Modules to the ICSS format is through the require hook. The require hook will bind itself to node's require and automatically compile files on the fly. This is similar to Babel's babel/register.

Install

$ npm i sullenor/css-modules-require-hook

Usage

require('css-modules-require-hook');

Specifying options

require('css-modules-require-hook')({
  // Setting this allows you to specify custom PostCSS plugins
  // You may use functions or strings, which match to the modules with the same name
  use: [] // may use `u` for short
});

About

A require hook to compile CSS Modules on the fly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.9%
  • CSS 1.1%