fromdeno / deno2node

Compile your Deno project to run on Node.js.
MIT License
117 stars 3 forks source link

Refactor CLI structure for deno install support #13

Closed KnorpelSenf closed 3 years ago

KnorpelSenf commented 3 years ago

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.

wojpawlik commented 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.