@0x-lerna-fork/collect-uncommitted 中文文档教程
@0x-lerna-fork/collect-uncommitted
检查 git 工作树状态并收集未提交的更改以供显示
Usage
const collectUncommitted = require("@0x-lerna-fork/collect-uncommitted");
// values listed here are their defaults
const options = {
cwd: process.cwd(),
log: require("npmlog"),
};
(async () => {
try {
const results = await collectUncommitted(options);
console.log(`Uncommitted changes on CWD ${options.cwd}: ${results.join("\n")}`);
} catch (err) {
console.error(err.message);
}
})();
安装 lerna 以访问 lerna
CLI .
@0x-lerna-fork/collect-uncommitted
Check git working tree status and collect uncommitted changes for display
Usage
const collectUncommitted = require("@0x-lerna-fork/collect-uncommitted");
// values listed here are their defaults
const options = {
cwd: process.cwd(),
log: require("npmlog"),
};
(async () => {
try {
const results = await collectUncommitted(options);
console.log(`Uncommitted changes on CWD ${options.cwd}: ${results.join("\n")}`);
} catch (err) {
console.error(err.message);
}
})();
Install lerna for access to the lerna
CLI.