File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 4444 "before 4am"
4545 ]
4646 } ,
47+ {
48+ // トップレベルの package.json/package-lock.json が更新されたときに発動する
49+ "description" : "When top-level is updated, also run npm install in all examples/*" ,
50+ "matchPaths" : [
51+ "package.json" , // リポジトリ直下の package.json
52+ "package-lock.json" // 必要ならロックファイルをトリガーにすることも可能
53+ ] ,
54+
55+ "postUpgradeTasks" : {
56+ // これらのコマンドが連続で実行される
57+ "commands" : [
58+ // 1. トップレベルの package-lock.json を再生成
59+ "npm install --package-lock-only" ,
60+
61+ // 2. すべてのサブディレクトリに対してロックファイルを再生成
62+ // bash 例: examples/* の各ディレクトリを回って package.json があるなら npm install
63+ "for d in examples/*; do if [ -f \"$d/package.json\" ]; then cd \"$d\" && npm install --package-lock-only && cd -; fi; done"
64+ ] ,
65+
66+ // コマンド実行後、コミットに含めるファイル
67+ "fileFilters" : [
68+ // トップレベルの package-lock.json
69+ "package-lock.json" ,
70+ // examples 配下のすべての package-lock.json
71+ "examples/**/package-lock.json"
72+ ]
73+ }
74+ }
4775 ]
4876}
You can’t perform that action at this time.
0 commit comments