2017-05-10 6 views
0

그래서 내 package.json에는 항상 최신 빌드가되어야하는 git ssh url에서 npm libs 및 개인 repo를 가져옵니다. yarn.lock은 git sha와 원사 업그레이드 등을 추가하여 최신 것을 포착하지 않습니다. 주어진 기본적으로 내 yarn.lock 파일에 패키지가 포함되지 않도록하려면 어떻게합니까?

이 :

"dependencies": { 
    "some-package"  : "^0.x.x", 
    "some-other-package" : "*", 
    "my-private-git-repo" : "git+ssh://[email protected]/me/myrepo.git", 
    "lastlibrary"   : "^4.0.3" 
}, 

내가 my-private-git-repo

이 가능 무시 yarn.lock 또는 NPM의 수축 포장을 원하는?

답변

0

음 나는 파일 자체에서 캐시 항목을 제거하기 위해 Perl을 사용하여이 문제를 해결할 수있었습니다.

perl -0777 -i -pe 's/(?s)"myrepo.*?\n\n//s' ./yarn.lock

:

"postinstall": "bash ./scripts/after_install.sh",

after_install.sh 지금이있다 : 내 package.json을 감안할 때

이있다