일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- qoddi
- dependencies
- Next.js
- GitHub
- naver api
- npm-check-updates
- package.json
- Github Pages
- bucket
- fly.io
- createRoot
- heroku
- hooks
- CSS
- AWS
- aws-sdk
- node.js
- php
- .eslintrc
- touch event
- react
- 반응형
- s3
- Web Storage
- 클린코드
- react18
- gh-pages
- dependabot
- 배포
- multer-s3
- Today
- Total
Ann's log
[React] npm-check-updates 사용하기 본문
이 글에서 정리하는 내용:
1. npm-check-updates의 역할
2. 설치 방법
3. 사용 방법
npm-check-updates의 역할
npm-check-updates 패키지는 내 프로젝트의 package.json dependencies를 최신 버전으로 업그레이드 해준다.
내가 일일이 확인할 필요 없이 한꺼번에 업데이트를 도와주니까 편리한 것 같다.
https://github.com/raineorshine/npm-check-updates
GitHub - raineorshine/npm-check-updates: Find newer versions of package dependencies than what your package.json allows
Find newer versions of package dependencies than what your package.json allows - GitHub - raineorshine/npm-check-updates: Find newer versions of package dependencies than what your package.json allows
github.com
설치 방법
설치 방법은 다음과 같이 global 설치를 진행하거나,
$ npm install -g npm-check-updates
npx를 사용하는 방법이 있다.
$ npx npm-check-updates
사용 방법
- 새로운 업데이트가 있는 모든 모듈 보기:
$ ncu
이 명령어를 입력하면 다음과 같이 업데이트가 필요한 패키지들을 보여준다.
- package.json 파일 업데이트하기:
$ ncu -u
이 명령어를 입력하면 package.json의 dependencies를 최신 버전으로 업데이트 해준다.
여기까지 하면 package.json 파일만 변경한 것이기 때문에 npm install 명령어를 통해 새로운 버전의 패키지를 설치해야 업데이트가 적용된다!
여기까지만 해도 사용 목적을 달성할 수 있지만, npm-check-updates 문서를 읽어보니 더 다양한 옵션을 적용할 수도 있는 것 같다.
참고:
'React' 카테고리의 다른 글
[React] touch 이벤트 다루기 (0) | 2022.06.27 |
---|---|
[React] sessionStorage 사용하기 (0) | 2022.06.20 |
[React] Github Pages로 배포하고 새로고침시 404 에러 해결 (0) | 2022.05.30 |
[React] Naver 지역 API 사용하기 (0) | 2022.04.30 |
[React] GitHub Pages로 배포하기 (0) | 2022.04.15 |