node_modules nexus publish
- npm install 로 설치한 node_modules 들을 일괄 nexus 에 올릴때
$> cd node_modules
$> find . -maxdepth 1 -mindepth 1 -type d -exec sh -c 'cd {} && npm pack' \;
- node_modules 디렉토리 보면 @ 가 붙은 디렉토리들이 있다.
- 이 경우 2번째 레벨의 디렉토리로 이동하여 압축하면 된다.
$> cd node_modules_alpha
$> find . -maxdepth 2 -mindepth 2 -type d -exec sh -c 'cd {} && npm pack' \;
*.tgz 파일 일괄 upload
- npm pack으로 압축한 모듈들을 nexus에 일괄 업로드 한다.
$> npm login --registry=https://your.nexus.com/repository/npm-public
login:
password:
$> find . -name *.tgz -exec npm pulish {} --registry=https://your.nexus.com/repository/npm-public \;