Utility for creating React Native CLI extensions
npm install react-native-cli-cliEasily create command-line extensions for React Native.
Have you ever wished you could automate some aspect of your initialization or build process? React Native can make that easy via the plugin and link event subsystems. This package makes it even easier to spin up extensions that let you leverage those functionalities.
``bash`
yarn global add react-native-cli-cli
react-native-cli init react-native-mytestextension
react-native init mytestapp
cd mytestapp
yarn add ../react-native-mytestextension
react-native --helpSee the added "mytestextension" options?
react-native mytestextensionSee the results?
react-native linkSee the prelink and postlink events fire?
cd ../react-native-mytestextension
code .Now make them do something useful for your projects!
`bash`
yarn global add react-native-cli-clior
npm i g react-native-cli-cli
``
react-native-cli init
Note In order to extend the react-native command list, your project name should start with react-native. This is not required for hooking the prelink and postlink events.
```
cd mytestapp
react-native myproject -a argumentand off you go!
The RNPM repository README contains excellent descriptions on how to extend via plugins and the link events.