--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
16
node_modules/vinyl-fs/lib/src/getContents/bufferFile.js
generated
vendored
Normal file
16
node_modules/vinyl-fs/lib/src/getContents/bufferFile.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
var fs = require('graceful-fs');
|
||||
var stripBom = require('strip-bom');
|
||||
|
||||
function bufferFile(file, cb) {
|
||||
fs.readFile(file.path, function (err, data) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
file.contents = stripBom(data);
|
||||
cb(null, file);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = bufferFile;
|
||||
Loading…
Reference in a new issue