Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Executable JavaScript Modules
":" //#;exec /usr/bin/env node --input-type=module - $@<$0
import process from 'process'
const { argv } = process
Copy link

subtleGradient commented Jul 30, 2021

Ran into an issue where prettier added a semicolon after ":" which broke this.
Adding prettier-ignore fixed it

":" /*prettier-ignore*/ //#;exec /usr/bin/env node --input-type=module - "$@" < "$0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment