npm-*: add short/long options and subcommand aliases (#21370)

This commit is contained in:
Nelson Figueroa
2026-03-05 00:29:28 -08:00
committed by GitHub
parent d25a80aa66
commit 3d095150d4
11 changed files with 39 additions and 39 deletions
+2 -2
View File
@@ -9,7 +9,7 @@
- 특정 범위로 개인 레지스트리에 로그인:
`npm login --scope {{@조직}} --registry {{https://registry.mycorp.com}}`
`npm login --scope {{@조직}} --registry {{https://registry.example.com}}`
- 특정 범위에서 로그아웃하고 인증 토큰 제거:
@@ -17,4 +17,4 @@
- 초기화 중 범위가 지정된 패키지 생성:
`npm init --scope {{@foo}} {{--yes}}`
`npm init --scope {{@foo}} {{[-y|--yes]}}`
+6 -6
View File
@@ -5,24 +5,24 @@
- `node_modules`의 패키지 중복 제거:
`npm dedupe`
`npm {{[ddp|dedupe]}}`
- 중복 제거 시 `package-lock.json` 또는 `npm-shrinkwrap.json`을 따르기:
`npm dedupe --lock`
`npm {{[ddp|dedupe]}} --lock`
- 엄격 모드로 중복 제거 실행:
`npm dedupe --strict`
`npm {{[ddp|dedupe]}} --strict`
- 중복 제거 시 선택적/피어 의존성 건너뛰기:
`npm dedupe --omit {{optional|peer}}`
`npm {{[ddp|dedupe]}} --omit {{optional|peer}}`
- 문제 해결을 위한 자세한 로깅 활성화:
`npm dedupe --loglevel verbose`
`npm {{[ddp|dedupe]}} --loglevel verbose`
- 특정 패키지에 대해 중복 제거 제한:
`npm dedupe {{패키지_이름}}`
`npm {{[ddp|dedupe]}} {{패키지_이름}}`
+4 -4
View File
@@ -5,16 +5,16 @@
- `package.json`에 나열된 의존성 설치:
`npm install`
`npm {{[i|install]}}`
- 특정 버전의 패키지를 다운로드하고 `package.json`의 의존성 목록에 추가:
`npm install {{패키지_이름}}@{{버전}}`
`npm {{[i|install]}} {{패키지_이름}}@{{버전}}`
- 최신 버전의 패키지를 다운로드하고 `package.json`의 개발 의존성 목록에 추가:
`npm install {{패키지_이름}} {{[-D|--save-dev]}}`
`npm {{[i|install]}} {{패키지_이름}} {{[-D|--save-dev]}}`
- 최신 버전의 패키지를 다운로드하고 전역으로 설치:
`npm install {{[-g|--global]}} {{패키지_이름}}`
`npm {{[i|install]}} {{패키지_이름}} {{[-g|--global]}}`
+1 -1
View File
@@ -9,4 +9,4 @@
- 전역 `node_modules` 디렉토리 경로 표시:
`npm root --global`
`npm root {{[-g|--global]}}`
+6 -6
View File
@@ -5,24 +5,24 @@
- 이름으로 패키지 검색:
`npm search {{패키지}}`
`npm {{[s|search]}} {{패키지}}`
- 특정 키워드로 패키지 검색:
`npm search {{키워드}}`
`npm {{[s|search]}} {{키워드}}`
- 패키지 검색 시 상세 정보 포함 (예: 설명, 작성자, 버전):
`npm search {{패키지}} --long`
`npm {{[s|search]}} {{패키지}} --long`
- 특정 작성자가 관리하는 패키지 검색:
`npm search --author {{작성자}}`
`npm {{[s|search]}} --author {{작성자}}`
- 특정 조직의 패키지 검색:
`npm search --scope {{조직}}`
`npm {{[s|search]}} --scope {{조직}}`
- 특정 조합의 용어로 패키지 검색:
`npm search {{용어1 용어2 ...}}`
`npm {{[s|search]}} {{용어1 용어2 ...}}`
+3 -3
View File
@@ -5,12 +5,12 @@
- 현재 프로젝트에서 패키지 제거:
`npm uninstall {{패키지_이름}}`
`npm {{[r|uninstall]}} {{패키지_이름}}`
- 전역에서 패키지 제거:
`npm uninstall -g {{패키지_이름}}`
`npm {{[r|uninstall]}} {{패키지_이름}} {{[-g|--global]}}`
- 여러 패키지를 한 번에 제거:
`npm uninstall {{패키지_이름1 패키지_이름2 ...}}`
`npm {{[r|uninstall]}} {{패키지_이름1 패키지_이름2 ...}}`
+1 -1
View File
@@ -9,7 +9,7 @@
- 전체 패키지 언퍼블리시:
`npm unpublish {{패키지_이름}} --force`
`npm unpublish {{패키지_이름}} {{[-f|--force]}}`
- 스코프가 있는 패키지 언퍼블리시:
+4 -4
View File
@@ -5,16 +5,16 @@
- 현재 프로젝트의 모든 패키지 업데이트:
`npm update`
`npm {{[up|update]}}`
- 현재 프로젝트의 특정 패키지 업데이트:
`npm update {{패키지}}`
`npm {{[up|update]}} {{패키지}}`
- 전역으로 패키지 업데이트:
`npm update -g {{패키지}}`
`npm {{[up|update]}} {{패키지}} {{[-g|--global]}}`
- 여러 패키지를 한 번에 업데이트:
`npm update {{패키지1 패키지2 ...}}`
`npm {{[up|update]}} {{패키지1 패키지2 ...}}`
+1 -1
View File
@@ -21,4 +21,4 @@
- 사용자 정의 커밋 메시지와 함께 메이저 버전 증가:
`npm version major -m "{{%s 이유로 업그레이드함}}"`
`npm version major {{[-m|--message]}} "{{%s 이유로 업그레이드함}}"`
+7 -7
View File
@@ -5,28 +5,28 @@
- 패키지의 최신 버전에 대한 정보 조회:
`npm view {{패키지}}`
`npm {{[v|view]}} {{패키지}}`
- 특정 버전의 패키지 정보 조회:
`npm view {{패키지}}@{{버전}}`
`npm {{[v|view]}} {{패키지}}@{{버전}}`
- 패키지의 모든 사용 가능한 버전 조회:
`npm view {{패키지}} versions`
`npm {{[v|view]}} {{패키지}} versions`
- 패키지 설명 조회:
`npm view {{패키지}} description`
`npm {{[v|view]}} {{패키지}} description`
- 패키지의 최신 버전의 의존성 조회:
`npm view {{패키지}} dependencies`
`npm {{[v|view]}} {{패키지}} dependencies`
- 패키지의 저장소 URL 조회:
`npm view {{패키지}} repository`
`npm {{[v|view]}} {{패키지}} repository`
- 패키지의 관리자 조회:
`npm view {{패키지}} maintainers`
`npm {{[v|view]}} {{패키지}} maintainers`
+4 -4
View File
@@ -5,16 +5,16 @@
- `package.json` dosyasında listelenen bağımlılıkları kurar:
`npm install`
`npm {{[i|install]}}`
- Bir paketin spesifik bir versiyonunu indirir ve `package.json` dosyasındaki bağımlılık listesine ekler:
`npm install {{paket_adı}}@{{versiyon}}`
`npm {{[i|install]}} {{paket_adı}}@{{versiyon}}`
- Paketin son sürümünü indirir ve `package.json` dosyasındaki geliştirme bağımlılık listesine ekler:
`npm install {{paket_adı}} {{-D|--save-dev}}`
`npm {{[i|install]}} {{paket_adı}} {{[-D|--save-dev]}}`
- Paketin son sürümünü indirir ve global olarak kurar:
`npm install {{-g|--global}} {{paket_adı}}`
`npm {{[i|install]}} {{paket_adı}} {{[-g|--global]}}`