0.0.3
๐พ ๐ฆ โ
Unversal Script Executor, zero install necessary
Repository
Current version released
2 years ago
What is this for?
Making scripts that work on a freshly setup PC (no prerequisites/manual dependencies)
How do I use it?
- Write a deno script, lets call it
example.js
console.log("Hello World")
- Install guillotine
deno install -Af https://deno.land/x/deno_guillotine@0.0.3/main/deno-guillotine.js
- Make your script portable
deno-guillotine ./example.js 1.24.3 # Deno version
- Profit
It will generate two files. One with no extension, and one with a.ps1
extension. One file is a shortcut to the other. Typing./example
will run the file with a specific version of deno, and if the user doesnโt have deno it is automatically installed (without changing the userโs PATH if they have another version of deno). One file is just a shortcut to the other one, and technically./example.ps1
will work on all platforms, but typing that is not as pretty.
How does it work?
Magic. The generated script is valid powershell, bash, and JavaScript all at the same time, which is what allows it to run cross-platform. I wrote out an explaination here that covers the basics, and I may write more in time.