package.jsonすべての開発依存関係をロードするプロジェクトがあります。でプロジェクトをインストールした後に git commit フックをインストールする方法はありnpm installますか?
1 に答える
1
npm プロジェクトを考慮すると、npm installそれ自体は git リポジトリをインストール/クローンするだけでなく、スクリプト セクションも解釈します。
{ "scripts" :
{ "install" : "scripts/install.js"
, "postinstall" : "scripts/install.js"
, "uninstall" : "scripts/uninstall.js"
}
}
installまたはステップでスクリプトを宣言してpostinstall、複製されたリポジトリにフックを追加できます。
于 2013-01-16T09:18:16.320 に答える