-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Hook System #190
Comments
That would be great! An hook system is flexible enough to let users do whatever scripting they want while keeping the core functionality untouched. |
I was thinking about this and I read your comment on issue #26. So, my idea is that nvm4w does not have to manage anything. Merely, it would be ideal for nvm4w to provide the hook functionality to empower end users. Manage
|
@aaroncalderon that is a really good example of exactly what I had in mind, i.e. users can create their own hook scripts and nvm4w will run them if they exist. Keeping modules in directories by semver would be quite complex, since it needs to account for both 32 and 64-bit architectures... not to mention npm from older versions of Node operates very differently from modern versions (and yarn treats the structure differently too). I'm trying to avoid dot files for the next version (see this post), but the idea of a module manifest of some kind could be incorporated into the hook system. Thanks for sharing your thoughts! |
Hey is this still being considered? Would love to see a hook system, would be super nice to have it automatically install yarn whenever I download/switch versions. |
@Copystrike Not in NVM4W (which is in a feature freeze), but event hooks and native handlers are a central part of Runtime. The use case you mention is one of several common ones we're using for testing. |
Awesome, @coreybutler! Can't wait to see those event hooks and native handlers in action in Runtime. By the way, I've signed up for the Runtime beta. Keep it up! |
There have been multiple requests for npm management and related workflow niceties, first noted in #26.
To resolve this, add a
hooks
directory, similar to how git does it. NVM4W should run anypre
andpost
scripts for the following operations:For anyone viewing this, I really want to keep NVM4W as slim as possible. The hook concept will allow custom functionality, but I'll likely put together several common examples, including how to use a common
node_modules
directory across multiple versions via symlink.The text was updated successfully, but these errors were encountered: