Use `require("graceful-fs")` if found instead of `require("fs")` #17

Closed
cadorn opened this Issue Feb 8, 2013 · 2 comments

Projects

None yet

2 participants

@cadorn
try {
  // optional dependency
  fs = require("graceful-fs")
} catch (er) {
  fs = require("fs")
}

See:

This would allow me to get rid of the graceful-fs dependency in my project and exclusively use fs-extra for my FS API.

@jprichardson
Owner

This is a good idea, I'll look into it.

@cadorn

Nice. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment