Skip to content

Commit 1e19ec2

Browse files
committed
add comments example
1 parent 39d46c7 commit 1e19ec2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

examples/comments.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* comment */
2+
3+
body {
4+
/* foo */
5+
/* bar */
6+
color: #eee;
7+
/* baz */
8+
}

examples/comments.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
/**
3+
* Module dependencies.
4+
*/
5+
6+
var parse = require('css-parse')
7+
, stringify = require('..')
8+
, fs = require('fs')
9+
, read = fs.readFileSync
10+
, css = read('examples/comments.css', 'utf8');
11+
12+
console.log(stringify(parse(css)));

0 commit comments

Comments
 (0)