-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
40 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# codebase-stats-cli | ||
CLI wrapper around https://github.com/anton-107/codebase-stats-collector | ||
|
||
CLI wrapper around https://github.com/anton-107/codebase-stats-collector | ||
|
||
## Usage | ||
|
||
``` | ||
npm run cli -- knowledge-gaps <PATH TO GIT REPO> --ignoreFiles /path/to/ignored/folder | ||
``` | ||
npm run cli -- knowledge-gaps | ||
``` |
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 |
---|---|---|
@@ -1,20 +1,36 @@ | ||
import { cli, command } from "cleye"; | ||
|
||
export class CommandLineInterface { | ||
constructor() {} | ||
public run() { | ||
cli({ | ||
commands: [ | ||
command( | ||
{ | ||
name: "knowledge-gaps", | ||
parameters: ["[prompt]"], | ||
}, | ||
async () => { | ||
console.log("Calculating files with least number of contributors"); | ||
}, | ||
), | ||
], | ||
}); | ||
} | ||
} | ||
constructor() {} | ||
public run() { | ||
cli({ | ||
commands: [ | ||
command( | ||
{ | ||
name: "knowledge-gaps", | ||
parameters: ["<path to repository>"], | ||
flags: { | ||
ignoreFiles: { | ||
type: String, | ||
description: "Which files to ignore in the output", | ||
}, | ||
}, | ||
}, | ||
async (argv) => { | ||
const repo = argv._.pathToRepository; | ||
console.log( | ||
"Calculating files with least number of contributors", | ||
repo, | ||
); | ||
if (argv.flags.ignoreFiles) { | ||
console.log( | ||
"will ignore the following files in the output: ", | ||
argv.flags.ignoreFiles, | ||
); | ||
} | ||
}, | ||
), | ||
], | ||
}); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import {CommandLineInterface} from "./cli"; | ||
import { CommandLineInterface } from "./cli"; | ||
|
||
new CommandLineInterface().run(); | ||
new CommandLineInterface().run(); |