Skip to content
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

nameless default bin #338

Open
phaux opened this issue Oct 3, 2023 · 1 comment
Open

nameless default bin #338

phaux opened this issue Oct 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@phaux
Copy link

phaux commented Oct 3, 2023

when provided with entry point { path: "mod.ts", kind: "bin" } the resulting package.json contains:

{
  "bin": {
    "undefined": "./esm/mod.js"
  }
}

I would expect it to generate:

{
  "bin": "./esm/mod.js"
}

Edit: actually the types say it is wrong (I casted to any and didn't notice) but it would be nice to support nameless bin regardless.

@dsherret
Copy link
Member

dsherret commented Nov 14, 2023

That's an invalid value because it doesn't have a name (it will raise a type checking error in the LSP or when doing deno run --check build.ts on the script). That said, it would be good to support an entrypoint without a name.

Edit: Oh, just realized your edit saying exactly that 😄

@dsherret dsherret added the enhancement New feature or request label Nov 14, 2023
@phaux phaux changed the title bin: { undefined: "path" } nameless default bin Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants