From 5c2a6552bf2c822b2e434f72ee8eceb611c86ce5 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 25 Sep 2024 11:37:43 +0300 Subject: [PATCH] fix: madrun: prepare --- .madrun.mjs | 1 + bin/init.mjs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.madrun.mjs b/.madrun.mjs index f9d6e14..5562603 100644 --- a/.madrun.mjs +++ b/.madrun.mjs @@ -25,4 +25,5 @@ export default { 'report': () => 'c8 report --reporter=lcov', 'postpublish': () => 'npm i -g', 'hello': noop, + 'prepare': () => 'echo "> prepare"', }; diff --git a/bin/init.mjs b/bin/init.mjs index 2edec5a..1e7b696 100644 --- a/bin/init.mjs +++ b/bin/init.mjs @@ -58,10 +58,9 @@ function updatePackage(scripts) { const result = {}; for (const key of keys(scripts)) { - if (key.startsWith('pre')) + if (key.startsWith('pre') && key !== 'prepare') continue; - console.log('xxxx', key); result[key] = `madrun ${key}`; }