@@ -8,16 +8,16 @@ cssparser.js
8
8
9
9
cssparser.js is a parser that generates json matched with source css structure.
10
10
11
- ##Description
11
+ ## Description
12
12
13
13
* License: MIT license - [ http://www.opensource.org/licenses/mit-license.php ] ( http://www.opensource.org/licenses/mit-license.php )
14
14
* Author : Chang W. Doh
15
15
16
- ##Demo
16
+ ## Demo
17
17
18
18
* [ http://cwdoh.github.io/cssparser.js/demo/CSS_stringify.html ] ( //cwdoh.github.io/cssparser.js/demo/CSS_stringify.html )
19
19
20
- ##Dependency
20
+ ## Dependency
21
21
22
22
Just want to use cssparser.js? Nothing needed.
23
23
@@ -26,9 +26,9 @@ If want generating parser, install 'jison' before it.
26
26
* Jison - [ http://jison.org ] ( http://jison.org )
27
27
28
28
29
- ##Usage
29
+ ## Usage
30
30
31
- ###from Command-line
31
+ ### from Command-line
32
32
33
33
34
34
First of all, you should install cssparser.
51
51
$ cssparser cssFile -o output_file
52
52
```
53
53
54
- ###from CommonJS Module
54
+ ### from CommonJS Module
55
55
56
56
You can generate javascript object from your javascript module.
57
57
@@ -69,22 +69,22 @@ var ast = parser.parse(raw)
69
69
var json = ast .toJSON (type)
70
70
```
71
71
72
- ##Generating parser from source
72
+ ## Generating parser from source
73
73
74
- ###Getting jison & source
74
+ ### Getting jison & source
75
75
76
76
``` bash
77
77
$ git clone https://github.com/cwdoh/cssparser.js.git
78
78
$ npm install
79
79
```
80
80
81
- ###Generating parser from source
81
+ ### Generating parser from source
82
82
83
83
``` bash
84
84
$ npm run build
85
85
```
86
86
87
- ##JSON Structure
87
+ ## JSON Structure
88
88
89
89
There are 3 types of JSON format.
90
90
@@ -95,15 +95,15 @@ There are 3 types of JSON format.
95
95
* atomic - most detailed. 'atomic' JSON has all pieces of each key & values in CSS.
96
96
* e.g. length has numeric value & its unit like "100px" -> { "value": 100, "unit": "px" }
97
97
98
- ##Example
98
+ ## Example
99
99
100
100
Example is tested with rulesets of [ http://css3please.com ] ( http://css3please.com )
101
101
102
102
``` bash
103
103
cssparser example/test.css --console -i 4
104
104
```
105
105
106
- ###Input
106
+ ### Input
107
107
108
108
``` css
109
109
@charset 'utf-8';
@@ -121,9 +121,9 @@ cssparser example/test.css --console -i 4
121
121
}
122
122
```
123
123
124
- ###JSON Output
124
+ ### JSON Output
125
125
126
- ####Type 'simple'
126
+ #### Type 'simple'
127
127
128
128
``` javascript
129
129
[
@@ -246,7 +246,7 @@ cssparser example/test.css --console -i 4
246
246
247
247
```
248
248
249
- ####Type 'atomic'
249
+ #### Type 'atomic'
250
250
251
251
``` javascript
252
252
{
@@ -398,8 +398,14 @@ cssparser example/test.css --console -i 4
398
398
}
399
399
```
400
400
401
- ##Change log
401
+ ## Change log
402
402
403
+ * 0.9.2 - March 17th, 2017
404
+ * Now supports beautify delimiter option for simple & deep type.
405
+ * Showing version will be run lower-case 'v' instead 'V'.
406
+ * Fixed missing keyframe name and added type & level descriptions for simple type.
407
+ * Fixed EOF error case.
408
+ * Added '-b' option for beautify delimiters.
403
409
* 0.9.1 - March 8th, 2017
404
410
* Added 'rule' type on the css style node when simple mode.
405
411
* 0.9.0 - March 5th, 2017
0 commit comments