提交 4c9e4e6e 编写于 作者: fxy060608's avatar fxy060608

add unpublish.js

上级 dc31f5ed
const fs = require('fs')
const path = require('path')
const shellExec = require('shell-exec')
const pkgs = fs.readdirSync(path.resolve(__dirname, 'packages'))
const version = process.argv[2]
if (!version) {
throw new Error('必须传入 version')
}
(async function() {
for (let i = 0; i < pkgs.length; i++) {
console.log(`npm unpublish @dcloudio/${pkgs[i]}@${version}`);
await shellExec(`npm unpublish @dcloudio/${pkgs[i]}@${version}`)
}
})();
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册