public
/
clean-css.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e1fdd2
)
Restores accepting `Buffer` as input.
author
Jakub Pawlowicz
<contact@jakubpawlowicz.com>
Wed, 7 Dec 2016 12:19:11 +0000
(13:19 +0100)
committer
Jakub Pawlowicz
<contact@jakubpawlowicz.com>
Fri, 16 Dec 2016 10:49:34 +0000
(11:49 +0100)
lib/utils/read-sources.js
patch
|
blob
|
history
diff --git
a/lib/utils/read-sources.js
b/lib/utils/read-sources.js
index
6177059
..
925af0b
100644
(file)
--- a/
lib/utils/read-sources.js
+++ b/
lib/utils/read-sources.js
@@
-29,6
+29,8
@@
var REMOTE_RESOURCE_PATTERN = /^(https?:)?\/\//;
function readSources(input, context, callback) {
if (typeof input == 'string') {
return fromString(input, context, {}, callback);
+ } else if (Buffer.isBuffer(input)) {
+ return fromString(input.toString(), context, {}, callback);
} else if (typeof input == 'object') {
return fromHash(input, context, {}, callback);
}