forked from teambit/bit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.js
More file actions
30 lines (25 loc) · 781 Bytes
/
command.js
File metadata and controls
30 lines (25 loc) · 781 Bytes
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
/** @flow */
export default class Cmd {
name: string;
description: string;
alias: string;
opts: [string, string, string][];
commands: Cmd[] = [];
private: ?boolean;
loader: ?boolean;
// eslint-disable-next-line no-unused-vars
action(params: any, opts: { [string]: any }, packageManagerArgs: string[]): Promise<any> {
console.log('"action" method not implemented on this command'); // eslint-disable-line no-console
return new Promise(resolve => resolve({}));
}
// eslint-disable-next-line no-unused-vars
report(data: any, params: any, opts: { [string]: any }): string {
return '"report" method not implemented on this command';
}
handleError(): ?string {
return null;
}
splitList(val: string) {
return val.split(',');
}
}