Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

matanlurey/dvm

Repository files navigation

dvm

Dart Version Manager: Manage multiple active Dart versions.

WORK IN PROGRESS: See "progress" below, not yet a stable package!

Loosely based on @cbracken's original dvm shell script. Thanks Chris!

Installation

$ pub global activate dvm

Usage

$ dvm

Manage multiple active Dart versions.

Usage: dvm <command> [arguments]

Global options:
-h, --help       Print this usage information.
-v, --version    Print out the latest released version of dvm.
-p, --path       Installation directory for the Dart SDK.
                 (defaults to "/Users/matanl/.dvm")

Available commands:
  help      Display help information for dvm.
  install   Download and install a <version/channel>.
  list      Lists the installed versions of the Dart SDK.
  switch    Switches the `current` directory to <version/channel>.

Progress

This package is a work in progress, and pull requests are welcome!

  • Use SHA256 to validate the download.
  • Support installing from a local path.
  • Configure whether to keep archives or auto-unzip.
  • Use system installed unzip if available.

Why a Dart package and not X?

Dart is already a cross-platform language, and binaries can be easily installed using pub global activate. I'm also hoping that being in Dart makes it more likely to get contributions from other Dart users!

One potential issue that was pointed out is the possibility of using dvm to switch to a version of the SDK that in turn, breaks dvm. That's a valid concern, so when releasing dvm it will ship with its own version of the Dart VM, similar to dart-sass.