You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since napa is meant to be used with libraries that don't supply package.json, it could be useful to allow the user to specify their own custom file to integrate more naturally with node.js.
My use case is simple: I don't want to have to require the absolute path to the "index" file of a library.
In other words, this is what I'm doing now:
varlib=require('lib/bin/index.js');
...when I'd much rather just be able to do this:
varlib=require('lib');
So my suggestion is to allow the user to specify a package.json body along with any URL.
Also, I created this package some time ago metamorph which will transform one meta file into another (but is in serious need of an update). It might be cool to detect other common meta files and create a package.json from one of those, if a specific user overridden package.json key is not supplied.
+1 to the idea. This would be really useful.
I don't know if you need a a full package.json. It would be enough for me to enable to specify the default main.
Since napa is meant to be used with libraries that don't supply
package.json
, it could be useful to allow the user to specify their own custom file to integrate more naturally with node.js.My use case is simple: I don't want to have to
require
the absolute path to the "index" file of a library.In other words, this is what I'm doing now:
...when I'd much rather just be able to do this:
So my suggestion is to allow the user to specify a
package.json
body along with any URL.Example:
package.json
:Another use-case might be a package that needs to be built ahead-of-time:
package.json
:I realize all of this could technically be achieved through scripts, but this would offer a more localized configuration.
Thoughts?
The text was updated successfully, but these errors were encountered: