Last active
October 26, 2022 07:20
-
-
Save jonathantneal/72f28886f901e952c5bf5da20e828488 to your computer and use it in GitHub Desktop.
Executable JavaScript Modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
":" //#;exec /usr/bin/env node --input-type=module - $@<$0 | |
import process from 'process' | |
const { argv } = process | |
console.log(argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ran into an issue where prettier added a semicolon after
":"
which broke this.Adding prettier-ignore fixed it
https://gist.github.com/subtleGradient/efb9bbea1400bc948b06859652c56d75/revisions#diff-c9a3d2ed9bfa0b7fa4f5ab7921276d3df64c217d65f4ef3878bd64ac2eb41008R1