-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
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
package.json bin #1
Comments
bins are symlinked, the module system still eventually resolves it to an absolute path. From there you can find the package.json. A bin to support both CJS and ES entry would most likely look like: // bin/app.js
require('../'); and in the case of this proposal the |
@caridy @bmeck not all bins are symlinked directly to a We could simply disallow bins that aren't symlinked that are standard modules, and this seems necessary for the file extension approach. In the |
A note to clarify |
If the package has a CLI that uses ES6 imports, how should we declare that the CLI is ES6 module ?
"bin.module": {}
or"module.bin": {}
or, should the "modules.root" take care of that internally, how should that work?
Update:
Also, for
node --module cli.js
, one can simply specify -#!/usr/bin/env node --module
and execute that as./cli.js
.But if you run
node cli.js
it would be script mode instead of module mode and would throw.The text was updated successfully, but these errors were encountered: