forked from thekevinbrown/react-native-schemes-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·33 lines (31 loc) · 1.11 KB
/
index.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
#!/usr/bin/env node
const yargs = require('yargs');
yargs
.usage('$0 command')
.command('all', 'run all bundled commands', yargs => {
const operations = require('./src');
for (const key of Object.keys(operations)) {
operations[key]();
}
})
.command('fix-libraries', 'add any missing build configurations to all xcode projects in node_modules', yargs => {
require('./src/fix-libraries')(yargs.argv.singleProject);
})
.command('fix-script', 'replace the react native ios bundler with our scheme aware one', yargs => {
require('./src/fix-script')();
})
.command('hide-library-schemes', `hide any schemes that come from your node modules directory so they don't clutter up the menu.`, yargs => {
require('./src/hide-library-schemes')();
})
.command('verify-config', `check the configuration and ensure we have both a postinstall script and xcodeSchemes configurations.`, yargs => {
require('./src/verify-config')();
})
.option('single-project', {
describe: 'Specify Xcode project name to fix a single project',
type: 'string',
default: null,
})
.demand(1, 'must provide a valid command')
.help('h')
.alias('h', 'help')
.argv;