기술
npm 명령어
cha123
2022. 4. 28. 19:39
npm & yarn 명령어 정리
npm 명령어yarn 명령어설명
npm init | yarn init | 프로젝트 초기화 |
npm install | yarn 또는 yarn install | package.json의 패키지 설치 |
npm install --save 패키지명 | yarn add 패키지명 | 패키지를 프로젝트 의존성 수준으로 추가 |
npm install --save-dev 패키지명 | yarn add --dev 패키지명 | 패키지를 프로젝트 개발 의존성 수준으로 추가 |
npm install --global 패키지명 | yarn global add 패키지명 | 패키지를 전역 수준으로 추가 |
npm update --save | yarn upgrade | 프로젝트 패키지 업데이트 |
npm run 스크립트명 | yarn 스크립트명 | package.json의 스크립트 명령 실행 |
npm uninstall --save 패키지명 | yarn remove 패키지명 | 패키지 삭제 |
npm cache clean | yarn cache clean | 캐쉬 삭제 |