-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
48 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
const program = require('commander') | ||
const sh = require('shelljs') | ||
const { error, success, warning, config, configFrom, queue, pwd, gitDir } = require('./index') | ||
/** | ||
* gitm clean | ||
*/ | ||
program | ||
.name('gitm clean') | ||
.description('清理gitmars缓存') | ||
.option('-f, --force', '强制清理', false) | ||
.action(opt => { | ||
sh.rm(gitDir + '/.gitmarscommands', gitDir + '/.gitmarslog') | ||
if (opt.force) { | ||
sh.echo(warning('您输入了--force,将同时清理本地gitmars配置文件')) | ||
sh.rm(pwd + '/gitmarsconfig.json', pwd + '/.gitmarsrc') | ||
} | ||
sh.echo(success('清理完毕')) | ||
}) | ||
program.parse(process.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters