Initial import with skill sheet working
This commit is contained in:
33
node_modules/vinyl-contents/index.js
generated
vendored
Normal file
33
node_modules/vinyl-contents/index.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
'use strict';
|
||||
|
||||
var Vinyl = require('vinyl');
|
||||
var bl = require('bl');
|
||||
|
||||
function vinylContents(file, cb) {
|
||||
if (!Vinyl.isVinyl(file)) {
|
||||
cb(new Error('Must be a Vinyl object'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (file.isBuffer()) {
|
||||
cb(null, file.contents);
|
||||
return;
|
||||
}
|
||||
|
||||
if (file.isStream()) {
|
||||
var bufferList = bl(function (err, data) {
|
||||
if (err) {
|
||||
cb(err);
|
||||
return;
|
||||
}
|
||||
|
||||
cb(null, data);
|
||||
});
|
||||
file.contents.pipe(bufferList);
|
||||
return;
|
||||
}
|
||||
|
||||
cb();
|
||||
}
|
||||
|
||||
module.exports = vinylContents;
|
||||
Reference in New Issue
Block a user