nodebrew 㧠Node.js 㨠npm ã®ç°¡åã¤ã³ã¹ãã¼ã«
npm ã使ãå¿ è¦ããã£ã¦éãè °ãä¸ãã¦ã¤ã³ã¹ãã¼ã«ã試ã¿ãããã³ã£ãããããããç°¡åã ã£ãã®ã§åããã°ã
1. nodebrew ã®ã¤ã³ã¹ãã¼ã«
node ã®ããããªãã¼ã¸ã§ã³ãæ軽ã«ã¤ã³ã¹ãã¼ã«ãããåãæ¿ãããããããã« nodebrew ãã¤ã³ã¹ãã¼ã«ã
以å使ã£ããã¨ãããã®ã¯ nvm (Node Version Manager) ãªãã ãã©ãnodebrew ã®ã»ãããã¹ã綺éºã ããã¨ããçç±ã§ nodebrew ã«ãã¦ã¿ãããç°¡åã ã£ããæ¬å½ã«ã³ã£ããããã
hokaccha/nodebrew · GitHub
ããã¥ã¡ã³ããå
å®ãã¦ã¦è³ããå°½ãããã
nodebrew ã¯ã³ãã³ãä¸çºã§ã¤ã³ã¹ãã¼ã«ã§ããã
~$ curl -L git.io/nodebrew | perl - setup % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 20087 100 20087 0 0 11314 0 0:00:01 0:00:01 --:--:-- 2452k fetching nodebrew... install nodebrew in $HOME/.nodebrew ======================================== Add path: export PATH=$HOME/.nodebrew/current/bin:$PATH ========================================
ä¸ã®éãã«ãã¹ãéãã
~$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zshrc ~$ source ~/.zshrc
bash 使ãã®äººã¯ ~/.zshrc ã§ã¯ãªã ~/.bashrc ã«ã
Mac ã®å ´å㯠~/.bash_profile ã§ãã¹ãéãå¿
è¦ããã ããããã©æªç¢ºèªã
2. node 㨠npm ã®ã¤ã³ã¹ãã¼ã«
ææ°ã®å®å®æ¿ãã¤ã³ã¹ãã¼ã«ã
~$ nodebrew install-binary stable fetch: http://nodejs.org/dist/v0.10.33/node-v0.10.33-linux-x64.tar.gz ######################################################################## 100.0% Install successful
nodebrew list ã§ã¤ã³ã¹ãã¼ã«æ¸ã¿ãã¼ã¸ã§ã³ã確èªã§ããã
~$ nodebrew list v0.10.33 current: none
å©ç¨ãããã¼ã¸ã§ã³ãåãæ¿ããã«ã¯ nodebrew useã
~$ nodebrew use v0.10.33 use v0.10.33 ~$ ~$ nodebrew list v0.10.33 current: v0.10.33 ~$ ~$ node -v v0.10.33
npm ããã£ããã«å ¥ã£ã¦ãã
~$ npm -v 1.4.28
ã¤ã³ã¹ãã¼ã«å®äºã
ãããç°¡åï¼
npm ã¨ã¯
npm ãä½ããããã®ãªã®ãæãåºããªãã£ãã®ã§ãã¤ãã§ã«è»½ãã°ã°ã£ãã
npm (software) - Wikipedia, the free encyclopedia
Node.js ã®æ¨æºã®ããã±ã¼ã¸ããã¼ã¸ã£ã§ãnode ã®ãã¤ããªã« bundle ããã¦ããã®ãããã
æ¬å®¶ããã¥ã¡ã³ãã¯ããã
https://www.npmjs.org/doc/