Skip to content

Commit d330419

Browse files
authored
Merge pull request #2 from philschatz/refactor
pin versions
2 parents dfdeae6 + b48400a commit d330419

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "css-coverage",
33
"version": "0.1.0",
44
"dependencies": {
5-
"commander": "^2.9.0",
6-
"css-parse": "^2.0.0",
7-
"phantomjs-prebuilt": "^2.1.12",
8-
"sizzle": "^2.3.3",
9-
"source-map": "^0.5.6"
5+
"commander": "2.9.0",
6+
"css-parse": "2.0.0",
7+
"phantomjs-prebuilt": "2.1.12",
8+
"sizzle": "2.3.3",
9+
"source-map": "0.5.6"
1010
},
1111
"bin": {
1212
"css-coverage": "bin/css-coverage"
@@ -18,5 +18,9 @@
1818
"unit",
1919
"test",
2020
"source-map"
21-
]
21+
],
22+
"main": "index.js",
23+
"repository": "https://github.com/philschatz/css-coverage.js.git",
24+
"author": "Philip Schatz <phil@cnx.org>",
25+
"license": "MIT"
2226
}

phantom-coverage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ page.open('file://' + htmlPath, function(status) {
2222
// This is the meat of the code. It runs inside the browser
2323

2424

25+
var rules = JSON.parse(cssJSON);
26+
2527
// Add default do-nothing for selectors used in cnx-easybake
2628
var PSEUDOS = ['deferred', 'pass', 'match', 'after', 'before', 'outside'];
2729
PSEUDOS.forEach(function(pseudo) {
@@ -30,7 +32,6 @@ page.open('file://' + htmlPath, function(status) {
3032
window.Sizzle.selectors.pseudos[pseudo] = function(elem) { return elem; };
3133
});
3234

33-
var rules = JSON.parse(cssJSON);
3435
rules.forEach(function(selectors) {
3536
var count = 0;
3637
// selectors could be null (maybe if it's a comment?)

0 commit comments

Comments
 (0)