update
This commit is contained in:
@@ -14,7 +14,7 @@ const parseIfJson = (str: string) => {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
const command = new Command('npm').description('npm command show publish and set .npmrc').action(async (options) => {});
|
||||
const command = new Command('npm').description('npm command show publish and set .npmrc').action(async (options) => { });
|
||||
const publish = new Command('publish')
|
||||
.argument('[registry]')
|
||||
.option('-p --proxy', 'proxy')
|
||||
@@ -33,6 +33,10 @@ const publish = new Command('publish')
|
||||
name: 'npm',
|
||||
value: 'npm',
|
||||
},
|
||||
{
|
||||
name: 'cnb',
|
||||
value: 'cnb'
|
||||
}
|
||||
],
|
||||
});
|
||||
}
|
||||
@@ -60,6 +64,9 @@ const publish = new Command('publish')
|
||||
case 'npm':
|
||||
cmd = 'npm publish --registry https://registry.npmjs.org';
|
||||
break;
|
||||
case 'cnb':
|
||||
cmd = 'npm publish --registry https://npm.cnb.cool/kevisual/registry/-/packages/';
|
||||
break;
|
||||
default:
|
||||
cmd = 'npm publish --registry https://npm.xiongxiao.me';
|
||||
break;
|
||||
@@ -136,6 +143,7 @@ const npmrc = new Command('set')
|
||||
const npmrcContent =
|
||||
config?.npmrc ||
|
||||
`//npm.xiongxiao.me/:_authToken=\${ME_NPM_TOKEN}
|
||||
//npm.cnb.cool/kevisual/registry/-/packages/:_authToken=\${CNB_API_KEY}
|
||||
//registry.npmjs.org/:_authToken=\${NPM_TOKEN}
|
||||
`;
|
||||
const execPath = process.cwd();
|
||||
|
||||
Reference in New Issue
Block a user