From e2aa4b4d379eb6e1ba487a23751e7cdec6f55f73 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Thu, 26 Jul 2018 23:35:49 +0000 Subject: [PATCH] Deploy website Deploy website version based on 94ae4b0a0fd42beac551fb544fb1de20b20564fb --- docs/next/refreshcontrol.html | 2 +- docs/next/refreshcontrol/index.html | 2 +- docs/next/understanding-cli.html | 40 ++++++++++++++++++++++++++ docs/next/understanding-cli/index.html | 40 ++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 2 deletions(-) diff --git a/docs/next/refreshcontrol.html b/docs/next/refreshcontrol.html index f4c31e12f10..56068b9ffc9 100644 --- a/docs/next/refreshcontrol.html +++ b/docs/next/refreshcontrol.html @@ -48,7 +48,7 @@ render() { return ( - <FlatList + <ScrollView refreshControl={ <RefreshControl refreshing={this.state.refreshing} diff --git a/docs/next/refreshcontrol/index.html b/docs/next/refreshcontrol/index.html index f4c31e12f10..56068b9ffc9 100644 --- a/docs/next/refreshcontrol/index.html +++ b/docs/next/refreshcontrol/index.html @@ -48,7 +48,7 @@ render() { return ( - <FlatList + <ScrollView refreshControl={ <RefreshControl refreshing={this.state.refreshing} diff --git a/docs/next/understanding-cli.html b/docs/next/understanding-cli.html index 9891a099043..ffa629f3b18 100644 --- a/docs/next/understanding-cli.html +++ b/docs/next/understanding-cli.html @@ -42,6 +42,46 @@

Parameters

The command name identifies the parameters that a command would expect. When the command parameter is surrounded by greater-than, less-than symbols < >, this indicates that the parameter is expected. When a parameter is surrounded by brackets [ ], this indicates that the parameter is optional.

+

Getting a list of all CLI commands

+

Running react-native --help from inside a React Native project will list all of your current commands. Here is an example from version 0.56:

+
  Usage: react-native [options] [command]
+
+  Options:
+
+    -V, --version                      output the version number
+    -h, --help                         output usage information
+
+  Commands:
+
+    start [options]                    starts the webserver
+    run-ios [options]                  builds your app and starts it on iOS simulator
+    run-android [options]              builds your app and starts it on a connected Android emulator or device
+    new-library [options]              generates a native library bridge
+    bundle [options]                   builds the javascript bundle for offline use
+    unbundle [options]                 builds javascript as "unbundle" for offline use
+    eject [options]                    Re-create the iOS and Android folders and native code
+    link [options] [packageName]       links all native dependencies (updates native build files)
+    unlink [options] <packageName>     unlink native dependency
+    install [options] <packageName>    install and link native dependencies
+    uninstall [options] <packageName>  uninstall and unlink native dependencies
+    upgrade [options]                  upgrade your app's template files to the latest version; run this after updating the react-native version in your package.json and running npm install
+    log-android [options]              starts adb logcat
+    log-ios [options]                  starts iOS device syslog tail
+    dependencies [options]             lists dependencies
+    info [options]                     Get relevant version info about OS, toolchain and libraries
+
+

CLI Configs

+

When using react-native start, its platform derivatives, and react-native bundle you can use a file to define the CLI options used by React Native by default. If you create a file rn-cli.config.js in the root of your project, it will be evaluated and options for the commands will come from there.

+

You can see the options for the CLI config file inside the source code for Metro here, and here is a common rn-cli.config.js used for supporting TypeScript in React Native projects:

+
module.exports = {
+  getTransformModulePath() {
+    return require.resolve('react-native-typescript-transformer');
+  },
+  getSourceExts() {
+    return ['ts', 'tsx'];
+  }
+}
+
← Testing your ChangesActivityIndicator →