Skip to content

Commit 5bc4476

Browse files
committed
refactor scripts/
1 parent abcecc1 commit 5bc4476

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/shebang.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { readFile, writeFile } from 'fs/promises'
22

3-
const [,,filename] = process.argv
3+
const [,,file] = process.argv
4+
45
const shebang = '#!/usr/bin/env node\n'
6+
const contents = await readFile( file, 'utf-8' )
57

6-
const contents = await readFile( filename, 'utf-8' )
7-
await writeFile( filename, shebang + contents )
8+
await writeFile( file, shebang + contents )

scripts/terse.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const terse = async (path: string) => {
2222
else await terseDir(path)
2323
}
2424

25-
2625
// CLI
2726
const [,,path] = process.argv
2827
terse(path)

0 commit comments

Comments
 (0)