Skip to content

Commit bb6d00a

Browse files
committed
Merge pull request #14 from necolas/upgrade-parser
Upgrade the CSS parser
2 parents 4484e95 + 34f1127 commit bb6d00a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var resolve = require('resolve'),
22
path = require('path'),
3-
parse = require('css-parse'),
3+
parse = require('css').parse,
44
fs = require('fs');
55

66
var ABS_URL = /^url\(|:\/\//,
@@ -107,7 +107,7 @@ function processPackage(shimPath) {
107107
return function (package) {
108108
package.main = shimPath || package.style || 'index.css';
109109
return package;
110-
}
110+
};
111111
}
112112

113113
function hasOwn(obj, prop) {

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"url": "https://github.com/conradz/rework-npm/issues"
2525
},
2626
"devDependencies": {
27-
"rework": "~0.20.1",
27+
"rework": "^1.0.0",
2828
"tap": "~0.4.4",
2929
"node-sass": "^0.8.1"
3030
},
3131
"dependencies": {
3232
"resolve": "~0.6.1",
33-
"css-parse": "~1.7.0"
33+
"css": "^2.0.0"
3434
}
3535
}

test.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test('Import package in @media', function(t) {
4848
'@media (min-width: 640px) {',
4949
' @import "test";',
5050
'}'
51-
].join('\n')
51+
].join('\n');
5252

5353
var output = rework(source).use(reworkNPM('test')).toString();
5454
t.equal(output, [
@@ -110,9 +110,10 @@ test('Include source maps', function(t) {
110110
t.equal(output,
111111
'.test {\n content: "Test package";\n}\n' +
112112
'/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozL' +
113-
'CJmaWxlIjoiZ2VuZXJhdGVkLmNzcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3Rl' +
114-
'c3QvaW5kZXguY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0ksdUJ' +
115-
'BQXVCIn0= */');
113+
'CJmaWxlIjpudWxsLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy90ZXN0L2luZGV4LmNz' +
114+
'cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJIiwic291cmNlc0NvbnR' +
115+
'lbnQiOlsiLnRlc3Qge1xuICAgIGNvbnRlbnQ6IFwiVGVzdCBwYWNrYWdlXCI7XG59XG' +
116+
'4iXX0= */');
116117
t.end();
117118
});
118119

0 commit comments

Comments
 (0)