We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when requiring this lib for use in an external codebase the lib/oa.js file calls minimist from the module scope to process process.argv.
lib/oa.js
minimist
process.argv
this in turn leads to requiring minimist as a runtime dep when not using the CLI interface.
https://github.com/openaddresses/lib/blob/master/oa.js#L11-L18
one potential solution is to use something like this if (require.main === module) { to distinguish between execution and inclusion.
if (require.main === module) {
alternatively this functionality could be moved to lib/src/cli.js and only run when the CLI interface is executed.
lib/src/cli.js
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when requiring this lib for use in an external codebase the
lib/oa.js
file callsminimist
from the module scope to processprocess.argv
.this in turn leads to requiring minimist as a runtime dep when not using the CLI interface.
https://github.com/openaddresses/lib/blob/master/oa.js#L11-L18
one potential solution is to use something like this
if (require.main === module) {
to distinguish between execution and inclusion.alternatively this functionality could be moved to
lib/src/cli.js
and only run when the CLI interface is executed.The text was updated successfully, but these errors were encountered: