bump version

This commit is contained in:
undefined committed 2022-11-27 03:06:50 +08:00
1 parent c2f5541e83
commit a24fec2e7c
11 files changed
+28 -31

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { SpawnOptions } from 'child_process';
import spawn from 'cross-spawn';
import { globby } from 'globby';
export const cwd = process.cwd();
export function getWorkspaces() {
return globby(require('../package.json').workspaces, {
cwd,
deep: 0,
onlyDirectories: true,
expandDirectories: false,
});
}
export function spawnAsync(command, path) {
const args = command.split(/\s+/);
const options: SpawnOptions = { stdio: 'inherit' };
if (path) options.cwd = path;
const child = spawn(args[0], args.slice(1), options);
return new Promise((resolve, reject) => {
child.on('close', resolve);
child.on('error', reject);
});
}