Skip to content

Commit

Permalink
Tidy up πŸ‘πŸ‘€β˜‘
Browse files Browse the repository at this point in the history
  • Loading branch information
spences10 committed May 19, 2017
1 parent f57ced0 commit 5b8506c
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@ A list of terminal commands and flags to help me use `npm`

Super charge `npm`

```
```shell
npm config set cache-min 9999999
```

## install package.json dependencies

```
```shell
npm install
```

**Shorthand**

```
```shell
npm i
```

## add standard by feross

```
```shell
npm install standard -g
```

## update npm

```
```shell
npm install -g npm@latest
```

Expand All @@ -41,40 +41,51 @@ npm install -g npm@latest

## installed version

`npm list` for local packages or `npm list -g` or `npm list -g --depth=0` for globally installed packages.
```shell
npm list # for local packages
npm list -g # all the packages
```

Globally installed packages.

```shell
npm list -g --depth=0
```

## Node Version Manager `nvm`

Say you want to install Node v6.9.1 you would write on the terminal:

```
```shell
nvm install 6
```

If you have multiple versions of Node.js installed on your workspace, you can switch to a specific version by writing:

```
```shell
nvm use 0.10.40
```

Making a node version default

In order to set a default version of node for your workspace, just type:

```
```shell
nvm alias default 6
```

Where 6 was the version you wanted to be used as default.

## Uninstall global package

```
```shell
npm -g uninstall <name> --save
```

## Upgrade NPM on Windows

After trying several times to upgrade npm on Windows I found this whilst poking around.

```shell
npm-windows-upgrade
```
Expand Down

0 comments on commit 5b8506c

Please sign in to comment.