Open namuol opened 10 years ago
That is a really cool idea. I am +1 for that.
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?