JamesJ
Denoβ€’2mo ago
James

Specifying default script configuration

Is there an equivalent to Python's Setuptools project.scripts for
deno.json
?

Currently the install command for one of my package CLIs looks like:

deno install --name="cmdname" --global --allow-read="." --allow-write="." --allow-env="PKGENVVAR" jsr:@myscope/mypackage/endpoint


I don't know if there is some way of specifying all of this in
deno.json
so people can just install the package with something simple like:

deno install --global jsr:@myscope/mypackage


And have it set the name, permissions, and endpoint from the configration.
Was this page helpful?