-
-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathcli.ts
More file actions
21 lines (20 loc) · 510 Bytes
/
Copy pathcli.ts
File metadata and controls
21 lines (20 loc) · 510 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import yargs from 'yargs/yargs';
import { hideBin } from 'yargs/helpers';
import { shareCommand } from './share';
yargs(hideBin(process.argv))
.command({
command: 'share <path>',
describe: 'Share the current project',
builder: (yargs) =>
yargs.positional('path', {
type: 'string',
describe: 'The path to the project to share',
demandOption: true,
}),
handler: (argv) => {
shareCommand(argv.path);
}
})
.demandCommand()
.help()
.parse();