fix: update build commands to run only if scripts are present

pull/10/head
David Montero Crespo 2026-03-06 13:01:13 -03:00
parent 16271c4bd1
commit 2a8d126b2b
1 changed files with 4 additions and 4 deletions

View File

@ -10,17 +10,17 @@ RUN npm install
# Build avr8js
COPY wokwi-libs/avr8js/ wokwi-libs/avr8js/
WORKDIR /app/wokwi-libs/avr8js
RUN npm install && npm run build
RUN npm install && npm run build --if-present
# Build rp2040js
# Build rp2040js (dist may already be committed; build only if script exists)
COPY wokwi-libs/rp2040js/ wokwi-libs/rp2040js/
WORKDIR /app/wokwi-libs/rp2040js
RUN npm install && npm run build
RUN npm install && npm run build --if-present
# Build wokwi-elements
COPY wokwi-libs/wokwi-elements/ wokwi-libs/wokwi-elements/
WORKDIR /app/wokwi-libs/wokwi-elements
RUN npm install && npm run build
RUN npm install && npm run build --if-present
# Build frontend
WORKDIR /app