Skip to content

Commit df50e67

Browse files
author
Kelly Selden
committed
use argv camel case
1 parent 7a8e1f5 commit df50e67

4 files changed

Lines changed: 7 additions & 50 deletions

File tree

bin/commands/default.js

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,10 @@ module.exports.command = '$0';
88
module.exports.builder = args;
99

1010
module.exports.handler = async function handler(argv) {
11-
let blueprint = argv['blueprint'];
12-
let from = argv['from'];
13-
let to = argv['to'];
14-
let resolveConflicts = argv['resolve-conflicts'];
15-
let runCodemods = argv['run-codemods'];
16-
let codemodsUrl = argv['codemods-url'];
17-
let codemodsJson = argv['codemods-json'];
18-
let reset = argv['reset'];
19-
let compareOnly = argv['compare-only'];
20-
let statsOnly = argv['stats-only'];
21-
let listCodemods = argv['list-codemods'];
22-
let createCustomDiff = argv['create-custom-diff'];
23-
let blueprintOptions = argv._.slice(0);
24-
2511
try {
2612
let result = await emberCliUpdate({
27-
blueprint,
28-
blueprintOptions,
29-
from,
30-
to,
31-
resolveConflicts,
32-
runCodemods,
33-
codemodsUrl,
34-
codemodsJson,
35-
reset,
36-
compareOnly,
37-
statsOnly,
38-
listCodemods,
39-
createCustomDiff
13+
...argv,
14+
blueprintOptions: argv._.slice(0)
4015
});
4116

4217
let ps = result.resolveConflictsProcess;

bin/commands/init.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,10 @@ module.exports.builder = {
1515
};
1616

1717
module.exports.handler = async function handler(argv) {
18-
let blueprint = argv['blueprint'];
19-
let to = argv['to'];
20-
let resolveConflicts = argv['resolve-conflicts'];
21-
let reset = argv['reset'];
22-
let blueprintOptions = argv._.slice(1);
23-
2418
try {
2519
let result = await init({
26-
blueprint,
27-
to,
28-
resolveConflicts,
29-
reset,
30-
blueprintOptions
20+
...argv,
21+
blueprintOptions: argv._.slice(1)
3122
});
3223

3324
let ps = result.resolveConflictsProcess;

bin/commands/install.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ module.exports.command = 'install <addon>';
77
module.exports.describe = 'install an addon';
88

99
module.exports.handler = async function handler(argv) {
10-
let addon = argv['addon'];
11-
1210
try {
13-
await install({
14-
addon
15-
});
11+
await install(argv);
1612
} catch (err) {
1713
console.error(err);
1814
}

bin/commands/save.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ module.exports.builder = {
1313
};
1414

1515
module.exports.handler = async function handler(argv) {
16-
let blueprint = argv['blueprint'];
17-
let from = argv['from'];
18-
let blueprintOptions = argv._.slice(1);
19-
2016
try {
2117
await save({
22-
blueprint,
23-
from,
24-
blueprintOptions
18+
...argv,
19+
blueprintOptions: argv._.slice(1)
2520
});
2621
} catch (err) {
2722
console.error(err);

0 commit comments

Comments
 (0)