[react-native] Update graceful-fs and use it in _build_bundle.js

This commit is contained in:
Amjad Masad 2015-08-20 12:57:05 -07:00
parent 6f17dba39b
commit 6debfce374
2 changed files with 2 additions and 9 deletions

View File

@ -54,7 +54,7 @@
"chalk": "1.0.0",
"connect": "2.8.3",
"debug": "2.1.0",
"graceful-fs": "3.0.6",
"graceful-fs": "4.1.2",
"image-size": "0.3.5",
"immutable": "^3.7.4",
"joi": "5.1.0",

View File

@ -58,14 +58,7 @@ exports.getDependencies = function(options, main) {
function useGracefulFs() {
var fs = require('fs');
var gracefulFs = require('graceful-fs');
// A bit sneaky but it's not straightforward to update all the
// modules we depend on.
Object.keys(fs).forEach(function(method) {
if (typeof fs[method] === 'function' && gracefulFs[method]) {
fs[method] = gracefulFs[method];
}
});
gracefulFs.gracefulify(fs);
}
function createServer(options) {