mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: 修复移动端导航栏丢失的问题
This commit is contained in:
1 parent
4d3501c611
commit
6d496258a6
6 files changed
+14
-10
No files matched your search
+5
-3
@@ -6,7 +6,7 @@ const spawn = require('cross-spawn');
|
||||
const cwd = process.cwd();
|
||||
|
||||
function getWorkspaces() {
|
||||
return globby(require('../package').workspaces, {
|
||||
return globby(require('../package.json').workspaces, {
|
||||
cwd,
|
||||
deep: 0,
|
||||
onlyDirectories: true,
|
||||
@@ -26,9 +26,11 @@ function spawnSync(command, silent) {
|
||||
}
|
||||
}
|
||||
|
||||
function spawnAsync(command) {
|
||||
function spawnAsync(command, path) {
|
||||
const args = command.split(/\s+/);
|
||||
const child = spawn(args[0], args.slice(1), { stdio: 'inherit' });
|
||||
const options = { 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