Closed KnorpelSenf closed 3 years ago
deno2node
is meant to be versioned per project, not installed globally with npm install --global
or deno install
.
As far as I'm aware, import.meta.main
check is useful only when a file can be both ran and imported.
I can't use it anyway, because it's not available in Node.js as of v16.7.0.
This PR adds a section to the README file that describes how to install the CLI using
deno install
.It is good practice to check
import.meta.main
in scripts before performing any operations. In order to obey this rule, this PR refactors the CLI structure.