Skip to content

Commit a3544f9

Browse files
committed
chore(scripts): add script to upgrade examples
1 parent 7b244aa commit a3544f9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"test:unit": "bun test tests/*.ts",
1414
"test:e2e": "bunx playwright test",
1515
"format": "bun --bun prettier --write . --cache",
16+
"upgrade-examples": "bun scripts/upgrade-examples.ts",
1617
"astro": "astro",
1718
"playwright": "playwright"
1819
},

scripts/upgrade-examples.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { $, Glob } from "bun";
2+
3+
const dirs = new Glob("*").scanSync({
4+
cwd: "examples",
5+
onlyFiles: false,
6+
absolute: true,
7+
});
8+
9+
for await (const dir of dirs) {
10+
await $`cd ${dir} && bun install`;
11+
}

0 commit comments

Comments
 (0)