Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker): install npm dependencies of emscripten #1371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ RUN echo "## Aggressive optimization: Remove debug symbols" \
&& find ${EMSDK}/upstream/bin -type f -exec strip -s {} + || true \
&& echo "## Done"

RUN echo "## Installing npm dependencies" \
Copy link
Collaborator

@sbc100 sbc100 Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The emsdk build script uses does install npm dependencies, just no the devDependencies. It uses npm ci --production --no-optional.

How about emsdk install tsc so that we its more obvious why we are doing this here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, in that case perhaps emscripten should move typescript to dependencies instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided we didn't want to add the tsc dependency for all users, and instead make it an optional dependencies that certain users can opt into.

We can possibly revisit that decision at a later date.

&& cd ${EMSDK} && . ./emsdk_env.sh \
&& cd ${EMSDK}/upstream/emscripten\
&& npm ci \
&& echo "## Done"

# ------------------------------------------------------------------------------
# -------------------------------- STAGE DEPLOY --------------------------------
# ------------------------------------------------------------------------------
Expand Down