Skip to content

Commit

Permalink
Run npm run build for building with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
paldepind committed Apr 10, 2024
1 parent eae9e69 commit 830a619
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion projectdo
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ try_nodejs() {
if ! $IS_TOOL && ! grep -q "^[[:space:]]*\"${node_action}\":" package.json; then
return 0
fi
execute_command "$tool" "$node_action"
if [ "$ACTION" = build ]; then
execute_command "$tool" "run build"
else
execute_command "$tool" "$node_action"
fi
}

# Rust + Cargo
Expand Down
4 changes: 2 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ if describe "stack"; then
fi
fi

if describe "nodejs"; then
if describe "npm and yarn"; then
if it "can run npm build if package.json with build script"; then
do_build_in "npm"; assert
assertEqual "$RUN_RESULT" "npm build"
assertEqual "$RUN_RESULT" "npm run build"
fi
if it "can run npm start if package.json with start script"; then
do_run_in "npm"; assert
Expand Down

0 comments on commit 830a619

Please sign in to comment.