精华 适用于 deno 的多版本管理工具 dvm 发布
发布于 6 年前 作者 justjavac 5202 次浏览 来自 分享

不知不觉中,deno 已经默默的发布了 3 个版本了:

  • 0.1.0
  • 0.1.1
  • 0.1.2

昨晚通宵做了一个 deno 多版本的管理工具: dvm。 github 地址: https://github.com/justjavac/dvm

功能基本参考了 nvm。

安装

npm install -g dvm

使用

➜  ~  dvm --help

Usage: dvm [options] [command]

Options:

  -v, --version      output the version number
  -d, --debug        Print verbose infos for debug
  -h, --help         output usage information

Commands:

  arch               Show if deno is running in 32 or 64 bit mode
  list               List all installed versions
  install <version>  Install deno <version>
  use [version]      Switch to use the specified version

在 Windows 平台需要使用管理员权限打开命令行或者 PowerShell

示例

列出所有已安装版本

➜  ~  dvm list
   0.1.0
*  0.1.1
   0.1.2

前面的星号(*)表示当前正在使用的版本。

切换版本

➜  ~  dvm use 0.1.2
now use 0.1.2
➜  ~  dvm use 0.0.2
deno v0.0.2 is not installed. Use `dvm install 0.0.2` to install it first.

目前功能比较简陋,bug 也不少,欢迎 issue https://github.com/justjavac/dvm

10 回复

有想法,有魄力 👍👍👍

@alsotang 只提供了基本功能。昨天晚上9点我孩子睡着后,我花了 2 个小时撸出来的。慢慢完善吧

等我学会了 rust,使用 rust 重构一版

楼主,你的博客 ERR_CONNECTION_RESET 了:(

@chapgaga 是 github 的原因。我直接使用的 github-pages

@justjavac deno不推崇使用node_modules,为什么要用npm来安装?

@cuitianze 我正在学 rust,下一个版本使用 rust 重写

回到顶部