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

Put cloned TypeScript repo somewhere other than the package dir #11

Open
jakebailey opened this issue Oct 12, 2023 · 2 comments
Open

Put cloned TypeScript repo somewhere other than the package dir #11

jakebailey opened this issue Oct 12, 2023 · 2 comments

Comments

@jakebailey
Copy link
Owner

Leaving this TODO for myself; right now, I store the clone of TypeScript and associated info / data inside of the package dir. This is fine, except if you use pnpm, the path to that dir changes whenever the package version is bumped, meaning the package gets duplicated and needs a reclone, which isn't great.

But, I don't want to have just one directory shared between every every-ts instance (since one might want to install it twice for some reason), so some other fix needs to be figured out there.

@voxpelli
Copy link

Maybe default to somewhere in ~/.cache/ + allow location to be overridden with a CLI flag, environment variable or such?

I use nvm and on every new version the npm packages are installed in a new location, which also requires a lot of needless fetching (and I guess disk space)

@jakebailey
Copy link
Owner Author

jakebailey commented Jan 29, 2024

An OS-specific user cache path was where I was thinking to put it, but I also want to avoid using it when every-ts is not installed globally (in case people want to install it right into their project and not use a global install, or for development of the tool). That, I'm less sure how to do.

I use nvm and on every new version the npm packages are installed in a new location, which also requires a lot of needless fetching (and I guess disk space)

FWIW, I personally set export npm_config_prefix="$HOME/.local" and then use shell aliases to always force global npm usages to cd to $HOME beforehand, that way my globally installed packages are independent of what node version I'm using. (I also use fnm which makes it easier for me to exec my "default" node version to run npm for consistency; I don't think nvm lets you do anything except touch the current shell.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants