Skip to content

Commit 5509f6f

Browse files
committed
Merge pull request reworkcss#63 from songawee/master
Update Readme.md to add installation and usage notes as well as related links
2 parents 67066f0 + 8686a95 commit 5509f6f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Readme.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
JavaScript CSS parser for nodejs and the browser.
44

5+
## Installation
6+
7+
$ npm install css-parse
8+
9+
## Usage
10+
11+
````javascript
12+
var parse = require('css-parse');
13+
14+
// CSS input string
15+
var css = "body { \n background-color: #fff;\n }";
16+
17+
var output_obj = parse(css);
18+
19+
// Position and Source parameters
20+
var output_obj_pos = parse(css, { position: true, source: 'file.css' });
21+
22+
// Print parsed object as CSS string
23+
console.log(JSON.stringify(output_obj, null, 2));
24+
25+
````
26+
527
## Example
628

729
css:
@@ -110,6 +132,11 @@ on `node.position.source`.
110132

111133
Parsed 15,000 lines of CSS (2mb) in 40ms on my macbook air.
112134

135+
## Related
136+
137+
[css-stringify](https://github.com/visionmedia/css-stringify "CSS-Stringify")
138+
[css-value](https://github.com/visionmedia/css-value "CSS-Value")
139+
113140
## License
114141

115142
MIT

0 commit comments

Comments
 (0)