-
Notifications
You must be signed in to change notification settings - Fork 63
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
transpile: feature: add a package.json
to generated output?
#341
Comments
package.json
to generated output?package.json
to generated output?
If I'm not mistaken, the wasmpack tool built support for exactly this feature. As well as auto-generating |
I don't necessarily want a publish-ready package.json; all I'm looking for is something that tells Node.js that the .js files in the The tl;dr: i just wanted |
If all goes to plan, Node.js should be defaulting to type detection in the April release, so in future we likely won't need that property (although for Node.js package publishing it will continue to be recommended). |
🤩 amazing! that's still 3 months away tho lol. and idk what the nodejs backporting situation is but who knows if that'll trickle down to v18 or whatever 🤷♀️ |
To clarify: I'm not necessarily asking for this to be the default behavior, just an additional option.
When I use jco, I often find myself needing to add a
package.json
so that:{"dependencies":{"@bytecodealliance/preview2-shim":"$VERSION"}}
.js
files as"type": "module"
filesEssentially my scripts end up looking like this:
Instead, I suggest adding a feature to allow generation of a package.json file when using
jco transpile
. Something like a--package-json
or--generate-package
or--package
or--manifest
idk.Why this would be good:
@bytecodealliance/preview2-shim
that jco is generating code forpackage.json
with{"type":"module"}
somewhere.Note that I'm not suggesting anything relating to package naming, versioning,
exports
,main
,author
, or any other "I want to publish thispackage.json
to the npm registry" fields. Thepackage.json
I want is strictly to allow it to integrate with my existing npm projects as a "sub-thing" (not sure how to describe it) that's specific to my project (with a bunch of--map "the:component/thing=./thing.js"
) NOT to generate a publishable npm package -- that's a separate discussion i thinkThe text was updated successfully, but these errors were encountered: