Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Finished nvm installation portion

  • Loading branch information...
commit c50d89686c7f330cad3a6e3dc1b231997e6573c7 1 parent 09d0a46
@croach authored
Showing with 36 additions and 48 deletions.
  1. +36 −48 02.md
View
84 02.md
@@ -56,55 +56,46 @@ offer.
### Installation
-The installation of nvm is quite simple, just go to its github page in
-your browser (you can do so by simply googling nvm and, most likely,
-it will be one of the first few results---if not the first). The
-installation is quite simple, it's basically a matter of storing the
-nvm directory somewhere in your filesystem and then sourcing the main
+The installation of nvm is very simple, just go to its github page in
+your browser (you can find it by simply googling for nvm and, more
+than likely, it will be one of the first few results---if not the
+first). The installation is basically just a matter of storing the nvm
+directory somewhere in your filesystem and then sourcing the main
shell script whenever you start a new shell. So, if you have git
-installed on your computer, you can copy this line here
-[copy the install line from the website] and run it at the command
-line.
+installed on your computer, you can just clone the repository to your
+local machine and rename it to .nvm in your home directory.
git clone git://github.com/creationix/nvm.git ~/nvm
-What this will do is checkout the nvm repository into a hidden
-directory named .nvm in your home directory. If you don't have git
-installed, one option would be to install it (honestly git is a great
-piece of software to have), but another option that's a bit faster is
-just to scroll back up a bit and click on the Downloads link here and
-then choose whether you want to download the repository as a zip file
-or a tarball. Once you've got that download, you'll need to unzip or
-untar it and then change its name and location to .nvm in your home
-directory.
-
-Next, we'll need to add little bit of code to our shell's config file,
-such as your .bashrc file, to make the environment aware of nvm. Let's
-go ahead and open that up now. So, here I'm going to pull up my
-.bashrc file---you'll need to place the following somewhere within
-this file:
+All this line is going to do is clone the nvm git repository to your
+home directory under the name nvm. Now I typically like to have these
+types of folders hidden, so I'm just going to go ahead and change the
+name of the nvm to .nvm to make make it hidden. This is a personal
+preference of mine, so feel free to skip this step, but just remember
+when updating your startup script, which we will be doing as our next
+step, you'll need to use the original name of the directory (i.e. nvm)
+rather than the name that I've just given it.
+
+So, now that we've got the source for nvm installed on our system, the
+next step will be to add a little bit of code to our shell's config
+file, such as your .bashrc file, to make the environment aware of
+nvm. Let's go ahead and open that up now. So, here I'm going to pull
+up my .bashrc file---you'll need to place the following somewhere
+within this file:
export NVM_HOME="$HOME/.nvm"
if [[ -f "$NVM_HOME/nvm.sh" ]]; then
source "$NVM_HOME/nvm.sh"
fi
-All this bit of code here does is, whenever a new shell session is
-started, it will check for the existence of the `nvm.sh` file within
-the `.nvm` directory that you just created. If it exists, it will run
-the file within the current shell creating several new shell functions
-for you to use. Now, you don't actually need to surround the `source`
-command with the check for the file's existence since we know it's
-there, but I like to have it there to keep the shell from screaming at
-me whenever I remove or move my .nvm directory for whatever
-reason. One more thing to notice, is that you can actually name your
-nvm directory whatever you want and keep it wherever you like. Calling
-it .nvm and placing it in your home directory is the default, but if
-you prefer to put it somewhere else, all you have to do is just change
-the `NVM_HOME` variable in the bit of code above to reflect your
-preferences. So, feel free to move the nvm folder around to somewhere
-else if having a hidden directory in your home directory is not to
-your liking.
+All that the little bit of code above does is first check for the
+existence of the `nvm.sh` file within the `.nvm` directory that you
+just created. Then, if it exists, it runs the file within the current
+shell creating several new shell functions for you to use. Now, you
+don't actually need to surround the `source` command with the check
+for the file's existence since we know it's there, but I like to have
+it there to keep the shell from screaming at me whenever I remove or
+move my .nvm directory for whatever reason.
Ok, now that we've got nvm installed, we just need to source our
startup file to get nvm to be recognized in the current shell. To make
@@ -134,16 +125,13 @@ that to start installing a copy of node. So, let's do that now.
To install a version of node you invoke the `nvm install` command with
the version number of the Node you want to install. For us that will
-be version 0.6.13, but an important thing to remember here is that the
+be version 0.6.15, but an important thing to remember here is that the
version number must be prefaced with a 'v' or else the install will
-not work. So, type the command `nvm install v0.6.13` at your command
-line now and you should see the download and installation begin. We
-want at least one more version of node installed to give us something
-to play around with, so once the current install is done, go ahead and
-install the version of node that we originally started using when we
-first started this series, v0.4.5. This will all take a little while
-so, Im just going to skip ahead to the end, so you may want to pause
-this screencast now until your installation is complete.
+not work. So, type the command `nvm install v0.6.15` at your command
+line now and you should see the download and installation begin. The
+installation is going to take a little while, so Im just going to skip
+ahead to the end, so you may want to pause this screencast now until
+your installation is complete.
Now that we've got a couple of versions of node installed on our
system, let's take another look at the output of `nvm ls`. Notice that
Please sign in to comment.
Something went wrong with that request. Please try again.