每次目录中有一个.nvmrc文件时,都会自动运行`nvm use` [英] run `nvm use` automatically every time there's a .nvmrc file on the directory

查看:75
本文介绍了每次目录中有一个.nvmrc文件时,都会自动运行`nvm use`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何配置我的外壳,以便每次在目录上存在.nvmrc文件时自动运行 nvm使用,并且在没有.nvmrc文件时使用最新版本或全局配置?

How to configure my shell so that nvm use run automatically every time there's a .nvmrc file on the directory and use the latest version or a global config when there's no .nvmrc file?

推荐答案

我刚刚发现有关Node.js的自动版本切换 https://github.com/wbyoung/avn ,您可以使用它.

I just found out about Automatic Version Switching for Node.js https://github.com/wbyoung/avn, you can use that.

您也可以关注此主题 https://github.com/creationix/nvm/issues/110

这篇关于每次目录中有一个.nvmrc文件时,都会自动运行`nvm use`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆