macbre/phantomas — pull request #21 by macbre (2013-08-03 19:50:59+00:00)
Title: Add analyze-css helper script

Examples:

```bash
./analyze-css.js --url "https://github.global.ssl.fastly.net/assets/github2-d35b02ba3940bde9b9f2c3e58f2dfb1ceff5886c.css" --json
```
```json
{"cssLength":176896,"selectorsTotal":2359,"selectorsPartsTotal":5703,"declarationsTotal":5188,"complexSelectors":300,"qualifiedRules":745,"selectorsByTag":1523,"selectorsByClass":4373,"selectorsById":543,"selectorsByPseudo":291,"importantsTotal":9}
```

More verbose output (with CSS optimization hints):

```bash
./analyze-css.js --url "https://github.global.ssl.fastly.net/assets/github2-d35b02ba3940bde9b9f2c3e58f2dfb1ceff5886c.css" --verbose
```
```
...
Qualified rule: #files .file .view-modes ul.view-modes-menu li
Complex selector: #files .file .view-modes ul.view-modes-menu li
Qualified rule: .file-box .view-modes ul.view-modes-menu li
Complex selector: .file-box .view-modes ul.view-modes-menu li
!important found: #files .file .hidden, .file-box .hidden { display: none !important; }
Qualified rule: #files .file .view-modes ul.view-modes-menu li:first-child
Complex selector: #files .file .view-modes ul.view-modes-menu li:first-child
Qualified rule: .file-box .view-modes ul.view-modes-menu li:first-child
Complex selector: .file-box .view-modes ul.view-modes-menu li:first-child
...
cssLength = 176896
selectorsTotal = 2359
selectorsPartsTotal = 5703
declarationsTotal = 5188
complexSelectors = 300
qualifiedRules = 745
selectorsByTag = 1523
selectorsByClass = 4373
selectorsById = 543
selectorsByPseudo = 291
importantsTotal = 9
```

Implements #16