Skip to content

Commit

Permalink
feat(publish-npm): force deps install before build
Browse files Browse the repository at this point in the history
  • Loading branch information
klarstrup committed Apr 16, 2024
1 parent 7c9d206 commit d38e317
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion publish-npm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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}`);
Expand Down

0 comments on commit d38e317

Please sign in to comment.