From d38e317a145e7b417ec088d610839123363b0f91 Mon Sep 17 00:00:00 2001 From: klarstrup Date: Tue, 16 Apr 2024 15:45:09 +0200 Subject: [PATCH] feat(publish-npm): force deps install before build --- publish-npm.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/publish-npm.mjs b/publish-npm.mjs index 8816a9c7..e7d3b22d 100644 --- a/publish-npm.mjs +++ b/publish-npm.mjs @@ -244,8 +244,9 @@ async function publish() { 'Git: Working tree dirty. Please resolve any changes before publishing.' ); return; + } else { + gitInd.succeed(`Git: Working tree clean`); } - gitInd.succeed(`Git: Working tree clean`); const commithash = execSync('git rev-parse --short HEAD', { encoding: 'utf8' @@ -257,6 +258,9 @@ async function publish() { .split('T')[0] .replaceAll('-', ''); + const installInd = ora(`Installing NPM dependencies`).start(); + await run('npm', ['i']); + installInd.succeed(`Installed NPM dependencies`); const buildInd = ora(`Building ${commithash}-${shortdate}`).start(); await run('npm', ['run', 'build']); buildInd.succeed(`Built ${commithash}-${shortdate}`);