diff --git a/_build.js b/_build.js new file mode 100644 index 0000000..53d67b5 --- /dev/null +++ b/_build.js @@ -0,0 +1,9 @@ +const { execSync } = require("child_process"); + +try { + execSync('tsc'); + console.log('Builded'); +} catch (e) { + console.error(e); + console.log('Builded with errors'); +} diff --git a/package.json b/package.json index 0d52b27..45a7cb8 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "scripts": { "build": "tsc --outDir ./lib", "prepublishOnly": "npm run build", - "prepare": "npm run build && husky install", + "prepare": "node ./_build.js && husky install", "lint": "biome lint --apply ./src", "format": "biome format --write ./src", "check-h": "biome check --apply ./src", @@ -71,4 +71,4 @@ "url": "https://github.com/socram03" } ] -} \ No newline at end of file +}