forked from lerna/lerna
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommand.js
39 lines (35 loc) · 1.11 KB
/
command.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"use strict";
/**
* @see https://github.com/yargs/yargs/blob/master/docs/advanced.md#providing-a-command-module
*/
exports.command = "import <dir>";
exports.describe = "Import a package into the monorepo with commit history";
exports.builder = yargs =>
yargs
.positional("dir", { describe: "The path to an external git repository that contains an npm package" })
.options({
flatten: {
group: "Command Options:",
describe: "Import each merge commit as a single change the merge introduced",
type: "boolean",
},
dest: {
group: "Command Options:",
describe: "Import destination directory for the external git repository",
type: "string",
},
"preserve-commit": {
group: "Command Options:",
describe: "Preserve original committer in addition to original author",
type: "boolean",
},
y: {
group: "Command Options:",
describe: "Skip all confirmation prompts",
alias: "yes",
type: "boolean",
},
});
exports.handler = function handler(argv) {
return require(".")(argv);
};