Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more

What is this for?

Making scripts that work on a freshly setup PC (no prerequisites/manual dependencies)

How do I use it?

  1. Write a deno script, lets call it example.js
console.log("Hello World")
  1. Install guillotine
deno install -Af https://deno.land/x/deno_guillotine@0.0.3/main/deno-guillotine.js
  1. Make your script portable
deno-guillotine ./example.js 1.24.3 # Deno version
  1. 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.