Node.js: creating ESM-based shell scripts for Unix and Windows

In this blog post, we learn how to implement shell scripts via Node.js ESM modules. There are two common ways of doing so:

We can write a stand-alone script and install it ourselves.
We can put our script in an npm package and use a package manager to…


This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer

In this blog post, we learn how to implement shell scripts via Node.js ESM modules. There are two common ways of doing so:

  • We can write a stand-alone script and install it ourselves.
  • We can put our script in an npm package and use a package manager to install it. That also gives us the option to publish the package to the npm registry so that others can install it, too.
[Read rest of post]


This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer


Print Share Comment Cite Upload Translate Updates
APA

Dr. Axel Rauschmayer | Sciencx (2022-07-28T00:00:00+00:00) Node.js: creating ESM-based shell scripts for Unix and Windows. Retrieved from https://www.scien.cx/2022/07/28/node-js-creating-esm-based-shell-scripts-for-unix-and-windows/

MLA
" » Node.js: creating ESM-based shell scripts for Unix and Windows." Dr. Axel Rauschmayer | Sciencx - Thursday July 28, 2022, https://www.scien.cx/2022/07/28/node-js-creating-esm-based-shell-scripts-for-unix-and-windows/
HARVARD
Dr. Axel Rauschmayer | Sciencx Thursday July 28, 2022 » Node.js: creating ESM-based shell scripts for Unix and Windows., viewed ,<https://www.scien.cx/2022/07/28/node-js-creating-esm-based-shell-scripts-for-unix-and-windows/>
VANCOUVER
Dr. Axel Rauschmayer | Sciencx - » Node.js: creating ESM-based shell scripts for Unix and Windows. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/07/28/node-js-creating-esm-based-shell-scripts-for-unix-and-windows/
CHICAGO
" » Node.js: creating ESM-based shell scripts for Unix and Windows." Dr. Axel Rauschmayer | Sciencx - Accessed . https://www.scien.cx/2022/07/28/node-js-creating-esm-based-shell-scripts-for-unix-and-windows/
IEEE
" » Node.js: creating ESM-based shell scripts for Unix and Windows." Dr. Axel Rauschmayer | Sciencx [Online]. Available: https://www.scien.cx/2022/07/28/node-js-creating-esm-based-shell-scripts-for-unix-and-windows/. [Accessed: ]
rf:citation
» Node.js: creating ESM-based shell scripts for Unix and Windows | Dr. Axel Rauschmayer | Sciencx | https://www.scien.cx/2022/07/28/node-js-creating-esm-based-shell-scripts-for-unix-and-windows/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.