Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
So there is this really cool library called zx which you can use to create scripts that are replacements for bash scripts. But one downside of it is, that now you have to have the Node.js runtime installed on the machine where this script should run. That's sad :(
For the packaging we will use the pkg library. But unfortunately pkg is not supporting ES modules which we configured by adding the "type": "module" to the package.json. So before we can use pkg we need to compile our script to a version which is not using ES modules. To do the compilation we will use esbuild. esbuild can also bundle our script into one file, so no dependencies on a node_modules folder are left in the compiled file. So let's install it.
For the packaging we will use the pkg library. But unfortunately pkg is not supporting ES modules which we configured by adding the "type": "module" to the package.json. So before we can use pkg we need to compile our script to a version which is not using ES modules. To do the compilation we will use esbuild. esbuild can also bundle our script into one file, so no dependencies on a node_modules folder are left in the compiled file. So let's install it.