Skip to content

Commit 380b04a

Browse files
authored
Update README.MD
1 parent ffa51d6 commit 380b04a

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.MD

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,27 @@ This module has no external dependencies.
2020

2121
### Usage
2222

23-
```
23+
```javascript
2424
const Css = require('json-to-css')
2525
const json = require('./some-css.json')
2626

2727
const css = Css.of(json)
2828
console.log(css)
29-
```
29+
```
30+
31+
### Output
32+
33+
You can get a pretty good idea of what the generated CSS looks like by looking at [the tests](json-to-css/src/css.spec.js), but in a pinch it produces a somewhat minified css output. Something like:
34+
35+
```javascript
36+
const json = require('my-css.json')
37+
// {
38+
// "h1": {
39+
// "font-size": "18vw",
40+
// "color": "#f00"
41+
// }
42+
// }
43+
44+
const css = Css.of(json)
45+
// h1{font-size:18vw;color:#f00;}
46+
```

0 commit comments

Comments
 (0)