Remove redundant scripts (#225)

Our SourceCred CLI tool now ipmlements printCombinedGraph and
cloneAndPrintGitGraph, but with more principled implementations and
interfaces :)

Test plan:
`yarn travis --full` passes, so I didn't delete any needed test infra.
This commit is contained in:
Dandelion Mané 2018-05-07 16:15:00 -07:00 committed by GitHub
parent 55856d7a46
commit 61635a14a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 82 deletions

View File

@ -65,10 +65,6 @@ module.exports = {
"src/plugins/github/bin/fetchAndPrintGithubRepo.js"
),
createExampleRepo: resolveApp("src/plugins/git/bin/createExampleRepo.js"),
cloneAndPrintGitGraph: resolveApp(
"src/plugins/git/bin/cloneAndPrintGitGraph.js"
),
printCombinedGraph: resolveApp("src/tools/bin/printCombinedGraph.js"),
loadAndPrintGitRepository: resolveApp(
"src/plugins/git/bin/loadAndPrintRepository.js"
),

View File

@ -1,36 +0,0 @@
// @flow
/*
* Command-line utility to load Git data using the API in
* ../cloneGitGraph, and print it to stdout. Useful for testing or
* saving some data to disk.
*
* Usage:
*
* node bin/cloneAndPrintGitGraph.js REPO_OWNER REPO_NAME
*
*/
import cloneGitGraph from "../cloneGitGraph";
import stringify from "json-stable-stringify";
function parseArgs() {
const argv = process.argv.slice(2);
const fail = () => {
const invocation = process.argv.slice(0, 2).join(" ");
throw new Error(`Usage: ${invocation} REPO_OWNER REPO_NAME`);
};
if (argv.length !== 2) {
fail();
}
const [repoOwner, repoName] = argv;
return {repoOwner, repoName};
}
function main() {
const {repoOwner, repoName} = parseArgs();
const graph = cloneGitGraph(repoOwner, repoName);
console.log(stringify(graph, {space: 4}));
}
main();

View File

@ -1,42 +0,0 @@
/*
* Command-line utility to fetch data for multiple plugins and print a combined
* graph. Currently imports data from the Git and GitHub plugins.
*
* Usage:
*
* node bin/printCombinedGraph.js REPO_OWNER REPO_NAME TOKEN
*
* where TOKEN is a GitHub authentication token, as generated from
* https://github.com/settings/tokens/new.
*/
import stringify from "json-stable-stringify";
import {loadCombinedGraph} from "../loadCombinedGraph";
function parseArgs() {
const argv = process.argv.slice(2);
const fail = () => {
const invocation = process.argv.slice(0, 2).join(" ");
throw new Error(`Usage: ${invocation} REPO_OWNER REPO_NAME TOKEN`);
};
if (argv.length !== 3) {
fail();
}
const [repoOwner, repoName, token] = argv;
return {repoOwner, repoName, token};
}
function main() {
const {repoOwner, repoName, token} = parseArgs();
loadCombinedGraph(repoOwner, repoName, token)
.then((data) => {
console.log(stringify(data, {space: 4}));
})
.catch((errors) => {
console.error("Errors processing the result:");
console.error(errors);
process.exit(1);
});
}
main();