Skip to content

Commit

Permalink
refactor: rename files (#1378)
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode authored Feb 1, 2024
1 parent 211b80a commit d8377fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin.js → bin.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import f, { writeFileSync as w } from 'fs'
import i from './index.js'
import i from './index.mjs'

let p, a, n, s, o, d

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion index.js → index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default (d = '.husky') => {

f.mkdirSync(_(), { recursive: true })
w(_('.gitignore'), '*')
f.copyFileSync(new URL('husky.sh', import.meta.url), _('h'))
f.copyFileSync(new URL('husky', import.meta.url), _('h'))
l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\${0%/*}/h"`, { mode: 0o755 }))
w(_('husky.sh'), '')
return ''
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
"funding": "https://github.com/sponsors/typicode",
"license": "MIT",
"author": "typicode",
"type": "module",
"bin": {
"husky": "bin.js"
"husky": "bin.mjs"
},
"exports": "./index.js",
"exports": "./index.mjs",
"engines": {
"node": ">=18"
}
Expand Down

0 comments on commit d8377fe

Please sign in to comment.