Writing Node Scripts
Published 📅: ....
Last modified 📝: ....
Share this post on BlueskySee discussion on Bluesky
When I find myself repeatedly making edits to a large number of files, or if I need to collect some metadata about a collection of files I tend to reach for a quick and dirty Node script.
Usually I can get by with a script.js file written somewhere and then run it
via node script.js, however sometimes I want to turn a script into a small
node package that I can install and reference elsewhere.
To accomplish that I usually reach for adding a package.json with a bin
script entry pointing to the node script.