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 -1
View File
@@ -6,6 +6,7 @@
const { gt } = require('semver');
const latest = require('latest-version');
const path = require('path');
const ora = require('ora');
const { getWorkspaces, spawnAsync } = require('./utils');
@@ -54,7 +55,10 @@ if (CI && (!tag || GITHUB_EVENT_NAME !== 'push')) {
if (Object.keys(bumpMap).length) {
for (const name in bumpMap) {
console.log(`publishing ${name}@${bumpMap[name]} ...`);
await spawnAsync(`yarn npm publish ${name} --new-version ${bumpMap[name]}${tag === 'dev' ? '-dev' : ''} --access public --tag ${tag}`);
await spawnAsync(
`yarn npm publish --new-version ${bumpMap[name]}${tag === 'dev' ? '-dev' : ''} --access public --tag ${tag}`,
path.resolve(`packages/${name}`),
);
}
}
console.log('Release created successfully.');
+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);