From d8377feddc5902154a7ef03981862245bf1d2eb3 Mon Sep 17 00:00:00 2001 From: typicode Date: Thu, 1 Feb 2024 15:39:13 +0100 Subject: [PATCH] refactor: rename files (#1378) --- bin.js => bin.mjs | 2 +- husky.sh => husky | 0 index.js => index.mjs | 2 +- package.json | 5 ++--- 4 files changed, 4 insertions(+), 5 deletions(-) rename bin.js => bin.mjs (95%) rename husky.sh => husky (100%) rename index.js => index.mjs (93%) diff --git a/bin.js b/bin.mjs similarity index 95% rename from bin.js rename to bin.mjs index 2f1c3be39..d954ed9ac 100755 --- a/bin.js +++ b/bin.mjs @@ -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 diff --git a/husky.sh b/husky similarity index 100% rename from husky.sh rename to husky diff --git a/index.js b/index.mjs similarity index 93% rename from index.js rename to index.mjs index 030acd266..f3a419cd0 100644 --- a/index.js +++ b/index.mjs @@ -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 '' diff --git a/package.json b/package.json index 990f75205..789ee3fc6 100644 --- a/package.json +++ b/package.json @@ -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" }