Skip to content

Commit 79700b8

Browse files
committed
added README with feature's description
1 parent 3276b09 commit 79700b8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
css-modules-require-hook
2+
========================
3+
4+
Automatically compiles a CSS Module to a low-level interchange format called ICSS or [Interoperable CSS](https://github.com/css-modules/icss).
5+
6+
One of the ways you can compile [CSS Modules](https://github.com/css-modules/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](https://babeljs.io/docs/usage/require/).
7+
8+
## Install
9+
10+
```bash
11+
$ npm i css-modules-require-hook
12+
```
13+
14+
## Usage
15+
16+
```javascript
17+
require('css-modules-require-hook');
18+
```
19+
20+
## Specifying options
21+
22+
```javascript
23+
require('css-modules-require-hook')({
24+
// Setting this allows you to specify custom PostCSS plugins
25+
// You may use functions or strings, which match to the modules with the same name
26+
use: [] // may use `u` for short
27+
});
28+
```

0 commit comments

Comments
 (0)