We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e26240c commit b3c1f1eCopy full SHA for b3c1f1e
scripts/shebang.mjs
@@ -0,0 +1,7 @@
1
+import { readFile, writeFile } from 'fs/promises'
2
+
3
+const filename = process.argv[2]
4
+const shebang = '#!/usr/bin/env node\n'
5
6
+const contents = await readFile( filename, 'utf-8' )
7
+await writeFile( filename, shebang + contents )
0 commit comments