refactor: image preview plugin (#3457)

This commit is contained in:
Alex Yang
2023-07-29 00:18:28 -07:00
committed by GitHub
parent be3909370e
commit 52809a2783
18 changed files with 129 additions and 45 deletions
+13 -14
View File
@@ -1,16 +1,15 @@
import { spawnSync } from 'node:child_process';
import { spawn } from 'node:child_process';
spawnSync('yarn', ['-T', 'run', 'dev-plugin', '--plugin', 'bookmark'], {
stdio: 'inherit',
shell: true,
});
const builtInPlugins = ['bookmark', 'hello-world', 'copilot', 'image-preview'];
spawnSync('yarn', ['-T', 'run', 'dev-plugin', '--plugin', 'hello-world'], {
stdio: 'inherit',
shell: true,
});
spawnSync('yarn', ['-T', 'run', 'dev-plugin', '--plugin', 'copilot'], {
stdio: 'inherit',
shell: true,
});
for (const plugin of builtInPlugins) {
const cp = spawn('yarn', ['-T', 'run', 'dev-plugin', '--plugin', plugin], {
stdio: 'inherit',
shell: true,
});
cp.on('exit', code => {
if (code !== 0) {
process.exit(code);
}
});
}