Skip to content

Commit

Permalink
chore: husky is esm now
Browse files Browse the repository at this point in the history
  • Loading branch information
simonecorsi committed May 21, 2024
1 parent c92a21e commit 58f9159
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"test": "nyc --reporter=lcov --reporter=text-summary ava -v && nyc check-coverage --lines 95",
"test:watch": "ava -w",
"toc": "markdown-toc -i README.md",
"prepare": "node prepare.js || echo 'Skipping prepare'"
"prepare": "node prepare.mjs || echo 'Skipping prepare'"
},
"repository": {
"type": "git",
Expand Down
13 changes: 0 additions & 13 deletions prepare.js

This file was deleted.

13 changes: 13 additions & 0 deletions prepare.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
let isCi = false;

try {
isCi = await import('is-ci').default;
} catch (_) {
isCi = true;
}

if (!isCi) {
const { default: husky } = await import('husky');
husky();
console.log('husky install');
}

0 comments on commit 58f9159

Please sign in to comment.