mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
22 lines
519 B
JavaScript
22 lines
519 B
JavaScript
import { exec } from "node:child_process";
|
|
import { readdirSync } from "node:fs";
|
|
import { dirname } from "node:path";
|
|
|
|
process.chdir(dirname(import.meta.dirname));
|
|
|
|
let extPath;
|
|
for (const filename of readdirSync("extension")) {
|
|
if (filename.endsWith(".vsix")) {
|
|
extPath = `extension/${filename}`;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!extPath) {
|
|
throw new Error("No .vsix file found");
|
|
}
|
|
|
|
exec(`code --new-window --install-extension=${extPath} --extensionDevelopmentPath=${process.cwd()} example`, {
|
|
stdio: "inherit",
|
|
});
|