ui: 修复移动端导航栏丢失的问题

This commit is contained in:
undefined committed 2021-05-27 12:47:06 +08:00
1 parent 4d3501c611
commit 6d496258a6
6 files changed
+14 -10

No files matched your search

+5 -3
View File
@@ -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);