관리 메뉴

AI 세상 ?

npm install (plugin) --save와 --save-dev 차이점 출처: http://ithub.tistory.com/165 [Fall in IT.] 본문

Development/Vue.js

npm install (plugin) --save와 --save-dev 차이점 출처: http://ithub.tistory.com/165 [Fall in IT.]

phpdoumi 2018. 8. 3. 11:12

npm install (plugin) --save와 --save-dev 차이점


안녕하세요.




오늘은 npm install 옵션 중 --save와 --save-dev의 차이점에 대해서 알아보도록 하겠습니다.






npm 이란?


npm은 JavaScript 용 패키지 관리자입니다. 

npm을 사용하면 JavaScript 개발자가 다른 개발자가 공유 한 코드를 쉽게 재사용 할 수 있습니다. 

https://docs.npmjs.com/getting-started/what-is-npm



npm install 이란?


npm install은 지정된 패키지를 기본적으로 의존성에 저장합니다. 또한 몇 가지 추가 옵션을 사용하여 저장 위치 및 방법을 제어 할 수 있습니다.

./node_modules 디렉터리에 패키지를 설치합니다.

https://docs.npmjs.com/cli/install




npm install (plugin) --save란?


패키지(plugin)를 ./node_moduels 디렉터리에 설치하고 ./package.json 파일의 dependencies 항목에 플러그인 정보가 저장 됩니다.

--production 빌드시 해당 플러그인이 포함됩니다.




npm install (plugin) --save-dev란?


패키지(plugin)를 ./node_moduels 디렉터리에 설치하고 ./package.json 파일의 devDependencies 항목에 플러그인 정보가 저장 됩니다.

--production 빌드시 해당 플러그인이 포함되지 않습니다.







참조


https://docs.npmjs.com/cli/install

http://ohyecloudy.com/ddiary/2016/09/04/til-npm-install-save-or-save-dev/



모두 즐거운 코딩하세요~




출처: http://ithub.tistory.com/165 [Fall in IT.]

'Development > Vue.js' 카테고리의 다른 글

emcascript 2015+ - 첫 번째 시간 const, let  (0) 2018.08.03
nodejs 8.11.1 + npm 5.6.0 설치  (0) 2018.05.11