mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bump version
This commit is contained in:
1 parent
c2f5541e83
commit
a24fec2e7c
11 files changed
+28
-31
No files matched your search
@@ -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);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user