Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
282 lines (227 sloc) 12.5 KB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>npm | day-by-day</title>
<meta name="description" content="인터넷, 기술, 영화, 음악 그리고 내 이야기">
<meta name="author" content="nezz">
<meta name="keywords" content="internet,tech,dev,movie,music,story" />
<meta name="generator" content="haroopress v0.9.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="/rss.xml" rel="alternate" title="day-by-day" type="application/rss+xml">
<!-- Le styles -->
<link rel="canonical" href="http://nezz.pe.kr">
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/css/font-awesome.css" rel="stylesheet">
<link href="/css/markdown.css" rel="stylesheet">
<link href="/css/haroopress.css" rel="stylesheet">
<link href="/css/theme.css" rel="stylesheet">
<link href="/css/code/default.css" rel="stylesheet">
<!-- Le fav and touch icons -->
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link rel="apple-touch-icon" sizes="72x72" href="/favicon-64.png">
<!-- Le javascript -->
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/jquery.jsonp.js"></script>
<script src="/js/mustache.js"></script>
<script src="/js/apps/github.js"></script>
<script src="/js/apps/twitter.js"></script>
</head>
<body data-spy="scroll" data-target=".subnav" data-offset="50">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="pull-right" href="/rss.xml"><img src="/img/buttons/rss.png" /></a>
<div class="nav-collapse">
<ul class="nav">
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/archives">Archives</a>
</li>
<li>
<a href="/slides">Slides</a>
</li>
<li>
<a href="/node-js-note/">Node.js note</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<link href="/css/code/default.css" rel="stylesheet">
<div class="container page-archive">
<div class="row">
<div class="span3">
<div id="author" class="well">
<div>
<h3>About Author</h3>
<ul class="thumbnails">
<li>
<a class="thumbnail">
<img src="http://www.gravatar.com/avatar/d1ca68e62108265ddf2e62b347aa716e?r=pg&amp;s=128.jpg&amp;d=identicon" />
</a>
</li>
</ul>
<p>
<strong>nezz</strong><br/>
blog: <a href="undefined" target="_blank">http://nezz.pe.kr</a><br/>
twitter: <a href="http://twitter.com/undefined" target="_blank">@imtaehyun</a><br/>
github: <a href="https://github.com/undefined" target="_blank">imtaehyun</a>
</p>
<p>
<a href="https://twitter.com/imtaehyun" class="twitter-follow-button" data-show-count="true">Follow @imtaehyun</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
<p>
<p>잠시나마 스티브잡스와 같은길을 걸어본 사람</p>
</p>
</div>
<div>
<h3>About this Article</h3>
<p>
<h5>Date Released:</h5>
<span>Sunday, November 11 2012 11:38 PM</span>
</p>
</div>
</div>
<div class="well">
<ul class="nav nav-list">
<li class="nav-header">Categories</li>
<li class=""><a href="/category"><i class="icon-home"></i> Home</a></li>
<li><a href="/category/dev"><i class="icon-book"></i> dev</a></li>
<li><a href="/category/story"><i class="icon-book"></i> story</a></li>
<li><a href="/category/haroopress"><i class="icon-book"></i> haroopress</a></li>
</ul>
</div>
<div class="well">
<ul class="nav nav-list">
<li class="nav-header">Recent Articles</li>
<li>
<a href="/post/first-server-with-node" target="_blank">First Server with node
<span class="label">nezz</span></a>
</li>
<li>
<a href="/post/npm" target="_blank">npm
<span class="label">nezz</span></a>
</li>
<li>
<a href="/post/haroopress-on-cloud-9" target="_blank">Cloud9 IDE에 하루프레스 설치하기!
<span class="label">nezz</span></a>
</li>
<li>
<a href="/post/harupeureseu-gaeindomein-seoljeongbangbeob" target="_blank">하루프레스 개인도메인 설정방법
<span class="label">nezz</span></a>
</li>
<li>
<a href="/post/h3-conference-2012" target="_blank">H3 Conference 2012 참가 후기
<span class="label">nezz</span></a>
</li>
</ul>
</div>
</div>
<div class="span9">
<div class="row">
<div class="span9">
<div class="well bg">
<div class="page-header">
<h1>npm</h1>
</div>
<div class="markdown-wrapper">
<h1 id="toc_40">Node Package Manager</h1>
<p>npm(Node Package Manger)는 node로 프로그래밍하는데 있어서 유용한 module들을 설치하고 업데이트하는 등의 관리를 도와준다.</p><p>또한 현재 사용하고 있는 node의 버전에 맞게 dependency check도 함께 해주는 유용함도 갖추고 있다.</p><p>npm은 따로 설치할 필요가 없다. node를 설치했다면 같이 설치되었을 것이다.</p><p><strong>npm website</strong> : <a href="http://npmjs.org/">http://npmjs.org/</a></p>
<h2 id="toc_41">사용법</h2>
<h3 id="toc_42">Module 설치법</h3>
<p><strong>npm install module_name</strong></p><p>위 명령을 실행한 디렉토리의 하위에 <code>node_module</code>을 생성하고 그 하위에 각 모듈을 설치한다. 가령 underscore.js 모듈을 설치한다면 아래와 같다.</p><p>Ex. <code>npm install underscore</code></p>
<h3 id="toc_43">Module 설치법 (Globally)</h3>
<p><strong>npm install module_name -g</strong></p><p><code>-g 옵션</code>으로 설치를 하면 각 node 프로그램에 각각 해당 module을 설치해줄 필요가 없다. 즉, 한번의 설치로 모든 node프로그램에 적용 가능하다.</p><p>Ex. <code>npm install underscore -g</code></p>
<h3 id="toc_44">Module Update 방법</h3>
<p><strong>npm update module_name</strong></p><p>해당 모듈의 업데이트 사항이 있는 경우 모듈을 업데이트 시켜준다.</p><p>Ex. <code>npm update underscore</code></p>
<h2 id="toc_45">여러가지 Node 모듈을 검색하는 방법</h2>
<ol>
<li><a href="http://npmjs.org/">npm</a>사이트를 이용한다. (검색을 지원하고, 각 모듈의 설명, 버전, Dependency 등등이 자세히 설명되어 있다.)</li>
<li><a href="http://google.com">Google 검색</a>을 이용하여 <code>모듈이름 nodejs</code>와 같이 검색하면 찾아준다. 보통 Github Repository들이 검색되고 README.md파일에 설치방법, 사용방법 등이 잘 기록되어 있으니 참고하면 된다.</li>
</ol>
<p><em class="label label-info"><strong><i class="icon-info-sign icon-white"></i> 관련링크</strong></em></p>
<ul>
<li><a href="http://npmjs.org">http://npmjs.org</a></li>
</ul>
</div>
<hr />
<div class="row-fluid">
<div class="pull-left">
<a href="/post/harupeureseu-gaeindomein-seoljeongbangbeob" class="btn btn-info"><i class="icon-white icon-chevron-left"></i> 하루프레스 개인도메인 설정방법</a>
</div>
</div>
<div class="row-fluid">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'nezz-blog'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
</div>
</div>
<div class="row">
</div>
</div>
</div>
<!--<div class="row">-->
<!--<div class="offset3 span9">-->
<!--<strong>tags</strong> :-->
<!---->
<!--<a href="/tag/node">node</a>&nbsp;-->
<!---->
<!--<a href="/tag/npm">npm</a>&nbsp;-->
<!---->
<!--</div>-->
<!--</div>-->
</div><!-- /container -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="span12 ">
<div class="well">
<p class="pull-right"><a href="#">Back to top</a></p>
<strong>haroopress</strong> developed by <a href="http://twitter.com/rhiokim" target="_blank">@rhiokim</a>,<a href="http://twitter.com/haroopress" target="_blank">@haroopress</a> and source in <a href="https://github.com/rhiokim/haroopress" target="_blank">github</a><br/>
Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.<br />
Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.
</div>
</div>
</div>
</div>
</footer>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36216394-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
Something went wrong with that request. Please try again.