2016-07-28 3 views

답변

1

당신은 &&로 체인에 의해 postinstall에서 여러 스크립트를 호출

{ 
    "scripts": { 
    "script1": "", 
    "script2": "", 
    "postinstall": "script1 && script2" 
    } 
} 

이 윈도우와 유닉스 (리눅스, 맥 OS) 단말기 모두에서 작동합니다.

+0

아니, 어쨌든 설치가 끝나면 postinstall이 아닌 다른 스크립트를 npm 설치로 설치해야합니다. – Jasmine

+1

@ 재스민 무슨 요점이 있니? 다른 스크립트의 내용을''postinstall '''에 넣거나, 정말로''postinstall ":''postinstall2' '를 실행하면됩니다.하지만 다시 요점은 없습니다. –

관련 문제