diff --git a/.husky/install.mjs b/.husky/install.mjs new file mode 100644 index 0000000..92482f3 --- /dev/null +++ b/.husky/install.mjs @@ -0,0 +1,7 @@ +// Skip Husky install in production and CI +if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') { + process.exit(0) +} + +const husky = (await import('husky')).default +console.log(husky()) diff --git a/package.json b/package.json index 7586a74..530ade5 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "lint": "prettier --check . && eslint .", "format": "prettier --write .", - "prepare": "husky" + "prepare": "node .husky/install.mjs" }, "lint-staged": { "*.{js,ts,svelte}": "eslint --fix --cache --cache-location ./node_modules/.cache/.eslintcache",