Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): Configure commands in root package, all other bits in cli …
…package This moves a step closer to the ideal of enabling third-party commands in the git manner. Refs #1584
- Loading branch information
Showing
8 changed files
with
83 additions
and
73 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
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,45 @@ | ||
"use strict"; | ||
|
||
const cli = require("@lerna/cli"); | ||
|
||
const addCmd = require("@lerna/add/command"); | ||
const bootstrapCmd = require("@lerna/bootstrap/command"); | ||
const changedCmd = require("@lerna/changed/command"); | ||
const cleanCmd = require("@lerna/clean/command"); | ||
const createCmd = require("@lerna/create/command"); | ||
const diffCmd = require("@lerna/diff/command"); | ||
const execCmd = require("@lerna/exec/command"); | ||
const importCmd = require("@lerna/import/command"); | ||
const initCmd = require("@lerna/init/command"); | ||
const linkCmd = require("@lerna/link/command"); | ||
const listCmd = require("@lerna/list/command"); | ||
const publishCmd = require("@lerna/publish/command"); | ||
const runCmd = require("@lerna/run/command"); | ||
const versionCmd = require("@lerna/version/command"); | ||
|
||
const pkg = require("./package.json"); | ||
|
||
module.exports = main; | ||
|
||
function main(argv) { | ||
const context = { | ||
lernaVersion: pkg.version, | ||
}; | ||
|
||
return cli() | ||
.command(addCmd) | ||
.command(bootstrapCmd) | ||
.command(changedCmd) | ||
.command(cleanCmd) | ||
.command(createCmd) | ||
.command(diffCmd) | ||
.command(execCmd) | ||
.command(importCmd) | ||
.command(initCmd) | ||
.command(linkCmd) | ||
.command(listCmd) | ||
.command(publishCmd) | ||
.command(runCmd) | ||
.command(versionCmd) | ||
.parse(argv, context); | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.