-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.ts
More file actions
29 lines (26 loc) · 1.05 KB
/
index.ts
File metadata and controls
29 lines (26 loc) · 1.05 KB
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
#!/usr/bin/env node
import { Command } from 'commander'
import packageJson from '../../package.json'
import { createModule } from './create'
const program = new Command()
program
.name(packageJson.name)
.description(packageJson.description)
.version(`CLI Version: ${packageJson.version}`, '-v, --version')
.argument('[name]', 'name of the module to create')
.option('-t, --package-type <packageType>', 'type of the package to create')
.option('--platforms <platforms>', 'comma-separated platforms to target')
.option('--langs <langs>', 'comma-separated languages to generate')
.option(
'-d, --module-dir <moduleDirectory>',
'directory to create the module in'
)
.option(
'--include-harness',
'include React Native Harness setup in the example app'
)
.option('-e, --skip-example', 'skip example app generation')
.option('-i, --skip-install', 'skip installing dependencies')
.option('--ci', 'run in CI mode')
.action(createModule)
program.allowUnknownOption().parse(process.argv)