@0x-lerna-fork/check-working-tree 中文文档教程
@0x-lerna-fork/check-working-tree
正确检查 git 工作树状态和错误
Usage
const checkWorkingTree = require("@0x-lerna-fork/check-working-tree");
// values listed here are their defaults
const options = {
cwd: process.cwd(),
};
(async () => {
try {
await checkWorkingTree(options);
} catch (err) {
console.error(err.message);
// "Working tree has uncommitted changes, ..."
}
})();
安装 lerna 以访问 lerna
CLI。
@0x-lerna-fork/check-working-tree
Check git working tree status and error appropriately
Usage
const checkWorkingTree = require("@0x-lerna-fork/check-working-tree");
// values listed here are their defaults
const options = {
cwd: process.cwd(),
};
(async () => {
try {
await checkWorkingTree(options);
} catch (err) {
console.error(err.message);
// "Working tree has uncommitted changes, ..."
}
})();
Install lerna for access to the lerna
CLI.