From 3835862f82c32c8d4beb550709e1352666942973 Mon Sep 17 00:00:00 2001 From: William Chargin Date: Fri, 29 Jun 2018 11:47:24 -0700 Subject: [PATCH] Create a V3 command-line entry point (#446) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Due to oclif’s structure, this entry point shares its `commands` directory with that of the V1 entry point. We’ll therefore add commands like `start-v3` as we go. Test Plan: `yarn backend` works, and `node bin/sourcecredV3.js start` launches the V1 server. wchargin-branch: v3-cli --- config/paths.js | 1 + src/v3/cli/sourcecred.js | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 src/v3/cli/sourcecred.js diff --git a/config/paths.js b/config/paths.js index 80868ff..20ea194 100644 --- a/config/paths.js +++ b/config/paths.js @@ -59,6 +59,7 @@ module.exports = { "commands/start": resolveApp("src/v1/cli/commands/start.js"), apiApp: resolveApp("src/v1/app/apiApp.js"), sourcecred: resolveApp("src/v1/cli/sourcecred.js"), + sourcecredV3: resolveApp("src/v3/cli/sourcecred.js"), fetchAndPrintGithubRepo: resolveApp( "src/v1/plugins/github/bin/fetchAndPrintGithubRepo.js" ), diff --git a/src/v3/cli/sourcecred.js b/src/v3/cli/sourcecred.js new file mode 100644 index 0000000..d8b001c --- /dev/null +++ b/src/v3/cli/sourcecred.js @@ -0,0 +1,5 @@ +// @flow +require("../../tools/entry"); +require("@oclif/command") + .run() + .catch(require("@oclif/errors/handle"));