kt3k / packup

📦 Zero-config web application packager for Deno
https://packup.deno.dev/
MIT License
328 stars 18 forks source link

feat(install_util): add support for `DENO_DIR` #31

Closed uki00a closed 2 years ago

uki00a commented 2 years ago

This PR changes install_util.ts to install esbuild.wasm into DENO_DIR if it is defined.

kt3k commented 2 years ago

@uki00a I'm ok with this addition but can you elaborate a little bit on the motivation of this change?

Do you usually specify DENO_DIR somewhere different from the default?

uki00a commented 2 years ago

@kt3k

Do you usually specify DENO_DIR somewhere different from the default?

Yes, I've specified the DENO_DIR explicitly in my ~/.zshrc.

I'm using asdf-deno to manage multiple Deno environments.

asdf-deno is dynamically switching DENO_DIR depending on the currently enabled Deno version.

For example, if the currently enabled version of Deno is v1.16.4, the following directory will be set to DENO_DIR:

~/.asdf/installs/deno/1.16.4/.cache/deno

To avoid this behavior by asdf-deno, I've explicitly set DENO_DIR in ~/.zshrc as follows:

export DENO_DIR=$HOME/.cache/deno

Therefore, I wanted esbuild.wasm used by packup to also be installed in ~/.cache/deno instead of ~/.deno :slightly_smiling_face:

kt3k commented 2 years ago

published as v0.1.10

uki00a commented 2 years ago

Thanks for the review and release!