@@ -5,49 +5,57 @@ title: Installation
55
66# Prerequisites
77
8- ` node.js ` (` npm ` included) required, please follow the installation guide :
8+ Install the latest LTS version of ` node.js ` (` npm ` included):
99
1010* [ Install from package manager] ( https://nodejs.org/en/download/package-manager/ )
1111* [ Install from directly download] ( https://nodejs.org/en/download/ )
1212
13- Please install the latest LTS version on the list above.
14-
15- Then verify the result:
13+ Check before going next:
1614
1715 $ node -v
1816 $ npm -v
1917
2018# Installation
2119
22- Choose one of the following ways to install leetcode-cli:
20+ There are different ways to install ` leetcode-cli ` :
2321
2422### From npm
2523
26- This will install the latest stable version, but not include the latest development version.
24+ This will install the latest STABLE version, but not include the latest DEV version.
2725
2826 $ npm install -g leetcode-cli
27+ $ leetcode version
2928
30- In case Ubuntu failed due to ` permission denied ` , run following and try again :
29+ In case Ubuntu failed due to ** permission denied** , try following :
3130
3231 $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
3332 $ source ~/.bashrc
3433 $ nvm install --lts
3534
36- See more details [ here] ( https://docs.npmjs.com/getting-started/fixing-npm-permissions ) .
35+ Find more details [ here] ( https://docs.npmjs.com/getting-started/fixing-npm-permissions ) .
3736
3837### From GitHub
3938
40- This will install the latest development version on GitHub.
39+ This will install the latest DEV version from GitHub repo .
4140
4241 $ npm install -g skygragon/leetcode-cli
42+ $ leetcode version
4343
44- ### From local source
44+ ### From source
4545
4646Similar with above, while you can introduce your own changes as you wish.
4747
4848 $ git clone http://github.com/skygragon/leetcode-cli
4949 $ cd leetcode-cli && ./bin/install
50+ $ leetcode version
51+
52+ ### From docker
5053
51- Then verify the result:
54+ NOTE: This is just a tiny taste to let you feel that leetcode-cli is. Please use other ways above to install leetcode-cli if you like it.
5255
56+ $ alias leetcode='docker run -it --rm skygragon/leetcode-cli'
5357 $ leetcode version
58+
59+ To persistent user data, you can mount a folder like this:
60+
61+ $ alias leetcode='docker run -it --rm -v /Users/skygragon/data:/root skygragon/leetcode-cli'
0 commit comments