Last active
April 20, 2016 08:08
-
-
Save hedgerh/0178fe3ace33b1161949491fd0e5b649 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| React Native CLI commands: | |
| # overview | |
| /** | |
| * Used arguments: | |
| * -v --version - to print current version of react-native-cli and react-native dependency | |
| * if you are in a RN app folder | |
| * init - to create a new project and npm install it | |
| * --verbose - to print logs while init | |
| * --version <alternative react-native package> - override default (https://registry.npmjs.org/react-native@latest), | |
| * package to install, examples: | |
| * - "0.22.0-rc1" - A new app will be created using a specific version of React Native from npm repo | |
| * - "https://registry.npmjs.org/react-native/-/react-native-0.20.0.tgz" - a .tgz archive from any npm repo | |
| * - "/Users/home/react-native/react-native-0.22.0.tgz" - for package prepared with `npm pack`, useful for e2e tests | |
| */ | |
| # start | |
| [ | |
| { | |
| command: 'port', | |
| default: 8081, | |
| type: 'string', | |
| }, { | |
| command: 'host', | |
| default: '', | |
| type: 'string', | |
| }, { | |
| command: 'root', | |
| type: 'string', | |
| description: 'add another root(s) to be used by the packager in this project', | |
| }, { | |
| command: 'projectRoots', | |
| type: 'string', | |
| description: 'override the root(s) to be used by the packager', | |
| },{ | |
| command: 'assetRoots', | |
| type: 'string', | |
| description: 'specify the root directories of app assets' | |
| }, { | |
| command: 'skipflow', | |
| description: 'Disable flow checks' | |
| }, { | |
| command: 'nonPersistent', | |
| description: 'Disable file watcher' | |
| }, { | |
| command: 'transformer', | |
| type: 'string', | |
| default: require.resolve('../../packager/transformer'), | |
| description: 'Specify a custom transformer to be used (absolute path)' | |
| }, { | |
| command: 'resetCache', | |
| description: 'Removes cached files', | |
| default: false, | |
| }, { | |
| command: 'reset-cache', | |
| description: 'Removes cached files', | |
| default: false, | |
| }, { | |
| command: 'verbose', | |
| description: 'Enables logging', | |
| default: false, | |
| } | |
| ] | |
| # bundle / unbundle | |
| [ | |
| { | |
| command: 'entry-file', | |
| description: 'Path to the root JS file, either absolute or relative to JS root', | |
| type: 'string', | |
| required: true, | |
| }, { | |
| command: 'platform', | |
| description: 'Either "ios" or "android"', | |
| type: 'string', | |
| }, { | |
| command: 'transformer', | |
| description: 'Specify a custom transformer to be used (absolute path)', | |
| type: 'string', | |
| default: require.resolve('../../packager/transformer'), | |
| }, { | |
| command: 'dev', | |
| description: 'If false, warnings are disabled and the bundle is minified', | |
| default: true, | |
| }, { | |
| command: 'prepack', | |
| description: 'If true, the output bundle will use the Prepack format.', | |
| default: false | |
| }, { | |
| command: 'bridge-config', | |
| description: 'File name of a a JSON export of __fbBatchedBridgeConfig. Used by Prepack. Ex. ./bridgeconfig.json', | |
| type: 'string' | |
| }, { | |
| command: 'bundle-output', | |
| description: 'File name where to store the resulting bundle, ex. /tmp/groups.bundle', | |
| type: 'string', | |
| required: true, | |
| }, { | |
| command: 'bundle-encoding', | |
| description: 'Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).', | |
| type: 'string', | |
| default: 'utf8', | |
| }, { | |
| command: 'sourcemap-output', | |
| description: 'File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map', | |
| type: 'string', | |
| }, { | |
| command: 'assets-dest', | |
| description: 'Directory name where to store assets referenced in the bundle', | |
| type: 'string', | |
| }, { | |
| command: 'verbose', | |
| description: 'Enables logging', | |
| default: false, | |
| } | |
| ] | |
| # library | |
| [{ | |
| command: 'name', | |
| description: 'Library name', | |
| type: 'string', | |
| required: true, | |
| }] | |
| # link | |
| 'Usage example: react-native link awesome-camera'; | |
| // argv examples: | |
| // ['link', 'awesome-camera'] | |
| // ['link', '[email protected]'] | |
| # runAndroid | |
| [{ | |
| command: 'install-debug', | |
| type: 'string', | |
| required: false, | |
| }, { | |
| command: 'root', | |
| type: 'string', | |
| description: 'Override the root directory for the android build (which contains the android directory)', | |
| }, { | |
| command: 'flavor', | |
| type: 'string', | |
| required: false, | |
| }] | |
| # runIos | |
| [ | |
| { | |
| command: 'simulator', | |
| description: 'Explicitly set simulator to use', | |
| type: 'string', | |
| required: false, | |
| default: 'iPhone 6', | |
| }, { | |
| command: 'scheme', | |
| description: 'Explicitly set Xcode scheme to use', | |
| type: 'string', | |
| required: false, | |
| }, { | |
| command: 'project-path', | |
| description: 'Path relative to project root where the Xcode project (.xcodeproj) lives. The default is \'ios\'.', | |
| type: 'string', | |
| required: false, | |
| default: 'ios', | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment