Skip to content

Commit 6bd7ebc

Browse files
committed
a
1 parent 1ed48d7 commit 6bd7ebc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

renovate.json5

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,33 @@
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
}

0 commit comments

Comments
 (0)