本サイトではアフィリエイト広告を利用しています。
expo-cliのコマンド自分用メモ2019/09/24

expo-cliのコマンド自分用メモ

expo-cli のコマンドのメモです。 それほど種類もないので簡単なのですが、オプションが結構あるので使いたいときに確認するためにブログに記録しておきます。

基本的にはExpo-CLIに書いてあることの引用です。 よく使う順に並び替えて、メモを足しています。

Expo-CLI コマンドメモ

Usage: expo [options] [command]

他のコマンドと同様です。

Options:
  -V, --version                                       output the version number
  -o, --output [format]                               Output format. pretty (default), raw
  --non-interactive                                   Fail, if an interactive prompt would be required to continue. Enabled by default if stdin is not a TTY.
  -h, --help                                          output usage information

あまり使わないです。-hでヘルプ。 各コマンドのヘルプを見るときはexpo [command] --helpします

よく使うコマンド

start|r [options] [project-dir]

ローカルサーバを開始

build:ios|bi [options] [project-dir]

iOSのビルドipaファイルがサーバに生成される。expo biは省略版

build:android|ba [options] [project-dir]

アンドロイドのビルドapk がサーバに生成される。expo baが省略版
expo ba -t app-bundleでaabが生成される。こっちのほうが使う。

fetch:ios:certs [options] [project-dir]

iOSの証明書やキーなどの情報を取得する。別の場所に大切に保管する。
パスワードが出力されるのでメモしておく。

fetch:android:keystore [options] [project-dir]

Androidの証明書やキーなどの情報を取得する。別の場所に大切に保管する。
パスワードが出力されるのでメモしておく。

optimize|o [options] [project-dir]

assetの圧縮、ビルド時に警告でるので気づいたら実行する。

login|signin [options]

expoへのログイン、必要なときに行う

logout

expoからのログアウト

使いそうなもの

build:status|bs [options] [project-dir]             Gets the status of a current (or most recently finished) build for your project.
eject [options] [project-dir]                       Creates Xcode and Android Studio projects for your app. Use this if you need to add custom native functionality.
diagnostics [project-dir]                           Prints environment info to console.
generate-module [options] [new-module-project]      Generate a universal module for Expo from a template in [new-module-project] directory.
init|i [options] [project-dir]                      Initializes a directory with an example project. Run it without any options and you will be prompted for the name and type.
publish:history|ph [options] [project-dir]          View a log of your published releases.
publish:details|pd [options] [project-dir]          View the details of a published release.
publish:set|ps [options] [project-dir]              Set a published release to be served from a specified channel.
publish:rollback|pr [options] [project-dir]         Rollback an update to a channel.
publish|p [options] [project-dir]                   Publishes your project to exp.host

あまり使わないもの

android [options] [project-dir]                     Opens your app in Expo on a connected Android device
build:web [options] [project-dir]                   Build a production bundle for your project, compressed and ready for deployment.
bundle-assets [options] [project-dir]               Bundles assets for a detached app. This command should be executed from xcode or gradle.
client:ios [options]                                Build a custom version of the Expo client for iOS using your own Apple credentials and install it on your mobile device using Safari.
doctor [options] [project-dir]                      Diagnoses issues with your Expo project.
export [options] [project-dir]                      Exports the static files of the app for hosting it on a web server.
fetch:android:hashes [options] [project-dir]        Fetch this project's Android key hashes needed to set up Google/Facebook authentication. Note: if you are using Google Play signing, this app will be signed with a different key after publishing to the store, and you'll need to use the hashes displayed in the Google Play console.
fetch:android:upload-cert [options] [project-dir]   Fetch this project's upload certificate needed after opting in to app signing by Google Play or after resetting a previous upload certificate.
install:ios                                         Install the latest version of Expo client for iOS on the simulator
install:android                                     Install the latest version of Expo client for Android on a connected device or emulator
ios [options] [project-dir]                         Opens your app in Expo in an iOS simulator on your computer
opt-in-google-play-signing [options] [project-dir]  Switch from the old method of signing APKs to the new App Signing by Google Play. The APK will be signed with an upload key and after uploading it to the store, app will be re-signed with the key from the original keystore.
prepare-detached-build [options] [project-dir]      Prepares a detached project for building
push:android:upload [options] [project-dir]         Uploads a Firebase Cloud Messaging key for Android push notifications.
push:android:show [options] [project-dir]           Print the value currently in use for FCM notifications for this project.
push:android:clear [options] [project-dir]          Deletes a previously uploaded FCM credential.
register                                            Sign up for a new Expo account
send [options] [project-dir]                        Sends a link to your project to an email address
upload:android|ua [options] [projectDir]            Uploads a standalone Android app to Google Play (works on macOS only). Uploads the latest build by default.
upload:ios|ui [options] [projectDir]                Uploads a standalone app to Apple TestFlight (works on macOS only). Uploads the latest build by default.
url|u [options] [project-dir]                       Displays the URL you can use to view your project in Expo
url:ipa [options] [project-dir]                     Displays the standalone iOS binary URL you can use to download your app binary
url:apk [options] [project-dir]                     Displays the standalone Android binary URL you can use to download your app binary
webhooks:set [options] [project-dir]                Set a webhook for the project.
webhooks:show [options] [project-dir]               Show webhooks for the project.
webhooks:clear [options] [project-dir]              Clear a webhook associated with this project.
whoami|w                                            Checks with the server and then says who you are logged in as

おわりに

とりあえずこんな感じ。 またよく使うものとかあったら逐次足していく予定です。

  • このエントリーをはてなブックマークに追加
prev
next