From: Jérôme Benoit Date: Tue, 3 Oct 2023 15:23:11 +0000 (+0200) Subject: refactor: convert commonjs files to esm X-Git-Tag: v3.0.0~16 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b15007875435353df8e15a3d80ee0ed277d681d7;p=poolifier.git refactor: convert commonjs files to esm Signed-off-by: Jérôme Benoit --- diff --git a/package.json b/package.json index 137ceb32..5c91b33b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "scripts": { "preinstall": "npx --yes only-allow pnpm", - "prepare": "node prepare.js", + "prepare": "node prepare.mjs", "build": "rollup --config --environment BUILD:development", "build:prod": "rollup --config", "build:typedoc": "rollup --config --environment DOCUMENTATION,BUILD:development", diff --git a/prepare.js b/prepare.js deleted file mode 100644 index 3dcaff37..00000000 --- a/prepare.js +++ /dev/null @@ -1,6 +0,0 @@ -const { env } = require('node:process') - -const isCIEnvironment = env.CI != null -if (isCIEnvironment === false) { - require('husky').install() -} diff --git a/prepare.mjs b/prepare.mjs new file mode 100644 index 00000000..245d65c3 --- /dev/null +++ b/prepare.mjs @@ -0,0 +1,7 @@ +import { env } from 'node:process' +import { install } from 'husky' + +const isCIEnvironment = env.CI != null +if (isCIEnvironment === false) { + install() +}