axios-miniprogram/scripts/publish.ts

19 lines
342 B
TypeScript
Raw Normal View History

2023-03-25 23:31:27 +08:00
import consola from 'consola';
import { exec, getPkgJSON } from './utils';
const { version } = getPkgJSON();
main();
function main() {
let command = 'npm publish --access public';
const preid = version.match(/\d-(.+)\.\d$/)?.[1];
if (preid) {
command += ` --tag ${preid}`;
}
consola.info('Publish NPM');
exec(command);
}