Skip to content

Commit dbf9d9e

Browse files
committed
Update readme.
1 parent 5c6a0ea commit dbf9d9e

File tree

1 file changed

+85
-8
lines changed

1 file changed

+85
-8
lines changed

README.md

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,102 @@
11
# DVM - Deno Version Manager
22

3-
![](https://github.com/ghosind/dvm/workflows/shellcheck/badge.svg)
3+
![shellcheck](https://github.com/ghosind/dvm/workflows/shellcheck/badge.svg)
44

55
Dvm is a nvm-like version manager for [Deno](https://deno.land/).
66

7-
## Usage
7+
## Installation
88

9-
Use `install <version>` command to download and install a specified version from the source.
9+
There are two ways to install dvm now:
1010

11+
1. Install dvm from network via following command:
12+
13+
```sh
14+
$ curl -o- https://raw.githubusercontent.com/ghosind/dvm/master/install.sh | bash
15+
```
16+
17+
2. Download and extract release zip, and execute `install.sh` script to install dvm:
18+
19+
```sh
20+
Download/dvm $ ./install.sh
21+
```
22+
23+
## Getting Start
24+
25+
After installed dvm, you can use it to manage
26+
27+
Use `dvm install <version>` command to download and install a specified version from the source.
28+
29+
```sh
30+
$ dvm install v1.0.0
31+
$ dvn install v0.42.0
32+
```
33+
34+
Use `dvm uninstall <version>` command to uninstall a specified version.
35+
36+
```
37+
$ dvm uninstall v0.39.0
38+
$ dvm uninstall v1.0.0-rc
39+
```
40+
41+
Use `dvm use [version]` command to link `deno` to the specified version by parameter or `.dvmrc` file.
42+
43+
```sh
44+
# use v1.0.0
45+
$ dvm use v1.0.0
46+
47+
# get version from .dvmrc file
48+
# $ cat .dvmrc
49+
# # v1.0.0
50+
$ dvm use
1151
```
12-
dvm install v1.0.0
13-
dvn install v0.42.0
52+
53+
Use `dvm current` command to display the current version of deno.
54+
55+
```sh
56+
$ dvm current
57+
# v1.0.0
58+
```
59+
60+
Use `dvm ls` command to list all installed versions, and use `dvm ls-remote` to list all available versions from remote.
61+
62+
```sh
63+
# list all installed versions
64+
$ dvm ls
65+
# list is an alias for ls command
66+
$ dvm list
67+
68+
# list all available versions
69+
$ dvm ls-remote
70+
# list-remote is an alias for ls-remote command
71+
$ dvm list-remote
1472
```
1573

16-
Use `uninstall <version>` command to uninstall a specified version.
74+
## Uninstalling dvm
1775

76+
You can execute following command to uninstall dvm:
77+
78+
```sh
79+
rm -rf "$DVM_DIR"
1880
```
19-
dvm uninstall v0.39.0
20-
dvm uninstall v1.0.0-rc
81+
82+
Edit shell config file (like `.bashrc` or `.zshrc`), and remove the following lines:
83+
84+
```sh
85+
# Deno Version Manager
86+
export DVM_DIR="$HOME/.dvm"
87+
export DVM_BIN="$DVM_DIR/bin"
88+
export PATH="$PATH:$DVM_BIN"
89+
[ -f "$DVM_DIR/dvm.sh" ] && alias dvm="$DVM_DIR/dvm.sh"
2190
```
2291

92+
## Contribution
93+
94+
1. Fork dvm project. ([https://github.com/ghosind/dvm](https://github.com/ghosind/dvm))
95+
2. Create your Branch. (`git checkout -b features/someFeatures`)
96+
3. Commit your Changes. (`git commit -m 'Add some features'`)
97+
4. Push to the Branch. (`git push origin features/someFeatures`)
98+
5. Create a new Pull Request.
99+
23100
## License
24101

25102
Distributed under the MIT License. See LICENSE file for more information.

0 commit comments

Comments
 (0)