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 abcecc1 commit 5bc4476Copy full SHA for 5bc4476
scripts/shebang.mjs
@@ -1,7 +1,8 @@
1
import { readFile, writeFile } from 'fs/promises'
2
3
-const [,,filename] = process.argv
+const [,,file] = process.argv
4
+
5
const shebang = '#!/usr/bin/env node\n'
6
+const contents = await readFile( file, 'utf-8' )
7
-const contents = await readFile( filename, 'utf-8' )
-await writeFile( filename, shebang + contents )
8
+await writeFile( file, shebang + contents )
scripts/terse.ts
@@ -22,7 +22,6 @@ const terse = async (path: string) => {
22
else await terseDir(path)
23
}
24
25
-
26
// CLI
27
const [,,path] = process.argv
28
terse(path)
0 commit comments