The devDependencies section of npm's package.json documentation says to list your test dependencies there so that users of your package don't have to pull down extra dependencies. Would it make sense to also add my test directory to .npmignore
in that case?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes that's what most people do, here are some npmignore files for popular Node.js modules:
https://github.com/LearnBoost/socket.io/blob/master/.npmignore
Other people whitelist what they want published in their package.json
files
setting:
https://github.com/senchalabs/connect/blob/master/package.json
https://github.com/strongloop/express/blob/master/package.json