Last active
April 4, 2018 02:08
-
-
Save SangHakLee/9513672e133c1027bc06a80c993d7025 to your computer and use it in GitHub Desktop.
NPM private registry my-module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-module", | |
"version": "1.1.0", | |
"description": "NPM private registry my-module.js", | |
"main": "index.js", | |
"scripts": { | |
}, | |
"repository": { | |
"type": "git", | |
"url": "https://gist.github.com/SangHakLee/9513672e133c1027bc06a80c993d7025" | |
}, | |
"publishConfig": { | |
"registry": "http://10.222.222.227:4873" | |
}, | |
"author": "sanghak,lee <code.ryan.lee@gmail.com>", | |
"license": "MIT" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
package.json에서 "publishConfig": {"registry": "http://10.222.222.227:4873"} 옵션이 있기 때문에
$ npm publish 요청시 http://registry.npmjs.org가 아닌 http://10.222.222.227:4873으로 publish한다.
만약, package.json에 해당 옵션을 주지 않으면 npm set registry http://10.222.222.227:4873 명령으로 registry를 변경 후 publish 한다.
이 경우 앞으로 모든 npm 요청이 set registry로 설정한 서버로 가기 때문에 public 모듈을 설치할 때 다시 npm set http://registry.npmjs.org 해줘야하는 번거로움이 있다