c6de77ca992648ea2be7beef5f35f5ce9f0151a9

Author
Mauro Porras P <mauroporrasp@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Add a React Native alias, and one to start the web server (#5711)

* Add a React Native alias, and one to start the web server

* Reorganise aliases in react-native plugin

* Update README for react-native plugin:

  Fix format and add a brief description
  Add missing aliases in react-native plugin README

Diff

 1diff --git a/plugins/react-native/README.md b/plugins/react-native/README.md
 2index 78bfb68447d674514d8f70009f6cc10f1fad2853..c6fe396b85667520b86fea78a30721bc298c7169 100644
 3--- a/plugins/react-native/README.md
 4+++ b/plugins/react-native/README.md
 5@@ -1,14 +1,26 @@
 6-# React Native 
 7+# React Native plugin
 8 
 9-**Maintainer:** [BilalBudhani](https://github.com/BilalBudhani)
10+This plugin adds completion for [`react-native`](https://facebook.github.io/react-native/).
11+It also defines a few [aliases](#aliases) for the commands more frequently used.
12 
13-### List of Aliases
14+To enable, add `react-native` to your `plugins` array in your zshrc file:
15 
16-Alias | React Native command
17-------|---------------------
18-**rnand** | *react-native run-android*
19-**rnios** | *react-native run-ios*
20-**rnios4s** | *react-native run-ios --simulator "iPhone 4s"*
21-**rnios5** | *react-native run-ios --simulator "iPhone 5"*
22-**rnios5s** | *react-native run-ios --simulator "iPhone 5s"*
23+```zsh
24+plugins=(... react-native)
25+```
26 
27+## Aliases
28+
29+| Alias       | React Native command                           |
30+|:------------|:-----------------------------------------------|
31+| **rn**      | `react-native`                                 |
32+| **rns**     | `react-native start`                           |
33+| **rnlink**  | `react-native link`                            |
34+| _App testing_                                                |
35+| **rnand**   | `react-native run-android`                     |
36+| **rnios**   | `react-native run-ios`                         |
37+| **rnios4s** | `react-native run-ios --simulator "iPhone 4s"` |
38+| **rnios5**  | `react-native run-ios --simulator "iPhone 5"`  |
39+| **rnios5s** | `react-native run-ios --simulator "iPhone 5s"` |
40+| **rnios6**  | `react-native run-ios --simulator "iPhone 6"`  |
41+| **rnios6s** | `react-native run-ios --simulator "iPhone 6s"` |
42diff --git a/plugins/react-native/react-native.plugin.zsh b/plugins/react-native/react-native.plugin.zsh
43index f19cba820c8d5a2ede3b63d676bebc9a7abce546..892a31fbe92add6199cb0ac81008b2c3512c1f0c 100644
44--- a/plugins/react-native/react-native.plugin.zsh
45+++ b/plugins/react-native/react-native.plugin.zsh
46@@ -1,9 +1,11 @@
47+alias rn='react-native'
48+alias rns='react-native start'
49+alias rnlink='react-native link'
50+
51 alias rnand='react-native run-android'
52+alias rnios='react-native run-ios'
53 alias rnios4s='react-native run-ios --simulator "iPhone 4s"'
54 alias rnios5='react-native run-ios --simulator "iPhone 5"'
55 alias rnios5s='react-native run-ios --simulator "iPhone 5s"'
56 alias rnios6='react-native run-ios --simulator "iPhone 6"'
57 alias rnios6s='react-native run-ios --simulator "iPhone 6s"'
58-alias rnios='react-native run-ios'
59-alias rnlink='react-native link'
60-