_react-native 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #compdef react-native
  2. #autoload
  3. local -a _1st_arguments
  4. _1st_arguments=(
  5. 'init:<ProjectName> generates a new project and installs its dependencies'
  6. 'android:creates an empty android project'
  7. 'start:starts the webserver'
  8. 'run-ios:builds your app and starts it on iOS simulator'
  9. 'run-android:builds your app and starts it on a connected Android emulator or device'
  10. 'new-library:generates a native library bridge'
  11. 'bundle:builds the javascript bundle for offline use'
  12. 'unbundle:builds javascript as "unbundle" for offline use'
  13. 'link:[options] <packageName> links all native dependencies'
  14. 'unlink:[options] <packageName> unlink native dependency'
  15. 'install:[options] <packageName> install and link native dependencies'
  16. 'uninstall:[options] <packageName> uninstall and unlink native dependencies'
  17. "upgrade: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"
  18. 'log-android:starts adb logcat'
  19. 'log-ios:starts iOS device syslog tail'
  20. )
  21. _arguments \
  22. '(--version)--version[show version]' \
  23. '(--help)--help[show help]' \
  24. '*:: :->subcmds' && return 0
  25. if (( CURRENT == 1 )); then
  26. _describe -t commands "react-native subcommand" _1st_arguments
  27. return
  28. fi