fix: update rp2040js build process to conditionally run based on package.json presence

pull/10/head
David Montero Crespo 2026-03-06 13:31:13 -03:00
parent 862d90c2b7
commit 9c376e70d4
1 changed files with 2 additions and 2 deletions

View File

@ -8,10 +8,10 @@ COPY wokwi-libs/avr8js/ wokwi-libs/avr8js/
WORKDIR /app/wokwi-libs/avr8js
RUN npm install && npm run build --if-present
# Build rp2040js (dist may already be committed; build only if script exists)
# Build rp2040js (submodule may be empty on CI; skip if no package.json)
COPY wokwi-libs/rp2040js/ wokwi-libs/rp2040js/
WORKDIR /app/wokwi-libs/rp2040js
RUN npm install && npm run build --if-present
RUN if [ -f package.json ]; then npm install && npm run build --if-present; fi
# Build wokwi-elements
COPY wokwi-libs/wokwi-elements/ wokwi-libs/wokwi-elements/