-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjavascript-notes.txt
39 lines (37 loc) · 1 KB
/
javascript-notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
* Installation
#+BEGIN_SRC sh
$ npm config get prefix
$ cd && mkdir .node_modules_global
$ npm config set prefix=$HOME/.node_modules_global
$ npm config get prefix
$ cat .npmrc
$ npm install npm --global
export PATH="$HOME/.node_modules_global/bin:$PATH"
$ which npm
$ npm install uglify-js --global
$ npm list --global
$ mkdir ~/project && cd ~/project
$ npm install underscore
/home/sitepoint/project
$ ls
node_modules
$ ls node_modules
underscore
$ npm list
$ npm uninstall underscore
- [email protected] node_modules/underscore
$ npm list
/home/sitepoint/project
└── (empty)
$ npm install [email protected]
$ npm update underscore
$ npm search mkdir
$ ls ~/.npm
_locks minimist mkdirp registry.npmjs.org underscore
$ npm cache clean
$ npm init
#+END_SRC
* Links
[[http://blog.teamtreehouse.com/install-node-js-npm-mac][How to Install Node.js and NPM on a Mac]]
[[https://www.sitepoint.com/beginners-guide-node-package-manager/][A Beginner's Guide to npm — the Node Package Manager]]