Using graceful-ncp instead of ncp#95
Conversation
|
ping |
|
I'm in favor of using |
|
The maintainer is serious about "not taking any dependencies into this module". One place where he has said it: AvianFlu/ncp#16. |
|
Yes, I saw that. It's not necessary to take it as a dependency. See this module as an example. It's just a matter of: try {
fs = require("graceful-fs")
} catch (er) {
fs = require("fs")
}No dependency required. |
|
Sure, I'll try. I assumed it wouldn't be accepted. |
|
Forgot to post the PR here; AvianFlu/ncp#70 |
|
Another possibility that might work better if the dependency is unacceptable is to just allow var gfs = require("graceful-fs");
var fs = require("fs-extra")( gfs );I didn't actually look at the code to know if this specifically is reasonable, but it would be nice to have the option of the library of you choice through some process. |
|
@traviswimer Either way, I think I'm going to fork |
|
Includes |
|
Could you clarify what impact this has? What do you mean by "io.js only"? Is this a backwards-incompatibile change? What I mean is will I have to switch to io.js everywhere my code is ran for this to work? I haven't read into io.js enough yet probably. |
|
@adam-lynch |
|
Thanks On Wed, 21 Jan 2015 22:52 JP Richardson notifications@github.com wrote:
|
This helps with EMFILE errors. See adam-lynch/graceful-ncp.
This is related to nwutils/nw-builder#123