1.PhoneGap CLIインストール

Android開発に関するメモランダム

カテゴリー: アプリ化  閲覧数:302 配信日:2018-08-03 10:41


コマンドプロンプト起動


キーボードのスタートボタン(Windowsマークのボタン) + Rを押下
・cmdと入力してOKを押下

コマンド入力


下記npmコマンドの意味
・ローカルマシンで実行するために必要なPhoneGap CLIの依存関係を取得する
・これにより、CLIを実行するために必要なコードを含むnode_modulesフォルダーが作成される
・-gフラグは、マシン上のどこからでもアクセスできるよう、このフォルダーがグローバルな場所にインストールされるよう指定
C:\Users\★★>npm install -g phonegap@latest
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
C:\Users\★★\AppData\Roaming\npm\phonegap -> C:\Users\★★\AppData\Roaming\npm\node_modules\phonegap\bin\phonegap.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\phonegap\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ phonegap@8.0.0
added 711 packages from 500 contributors in 110.204s


コマンドラインで「phonegap」と入力して、PhoneGap CLIが正しくインストールされていることを確認するテストを行う
・ヘルプテキストが出力されればOK
C:\Users\★★>phonegap

Usage: phonegap [options] [commands]

Description:

 PhoneGap command-line tool.

Commands:

 help [command]       output usage information
 create <path>        create a phonegap project
 build <platforms>    build the project for a specific platform
 install <platforms>  install the project on for a specific platform
 run <platforms>      build and install the project for a specific platform
 platform [command]   update a platform version
 plugin [command]     add, remove, and list plugins
 template [command]   list available app templates
 info                 display information about the project
 serve                serve a phonegap project
 version              output version number
 push                 send test push notification (to a push-notification-compatible application)
 analytics            turn analytics on or off, or view current status
 report-issue         opens your browser and launches github.com with a ready to report issue

Additional Commands:

 local [command]      development on local system
 remote [command]     development in cloud with phonegap/build
 prepare <platforms>  copies www/ into platform project before compiling
 compile <platforms>  compiles platform project without preparing it
 emulate <platforms>  runs the project with the flag --emulator
 cordova              execute of any cordova command

Options:

 -d, --verbose        allow verbose output
 -v, --version        output version number
 -h, --help           output usage information
 --no-update-notifier disable update notifier, to opt-out of update-notifier
                      change the 'optOut' property to 'true' in
                      ~/.config/configstore/update-notifier-phonegap.json

Examples:

 $ phonegap help create
 $ phonegap create path/to/my-app
 $ cd my-app/
 $ phonegap run ios
 $ phonegap analytics on



  ╭─────────────────────────────────────╮
  │                                     │
  │   Update available 6.5.2 → 8.0.0    │
  │   Run npm i -g phonegap to update   │
  │                                     │
  ╰─────────────────────────────────────╯


C:\Users\★★>





週間人気ページランキング / 2-16 → 2-22
順位 ページタイトル抜粋 アクセス数
アクセスが、ありませんでした! 0
2025/2/23 1:01 更新
指定期間人気ページランキング / 1970-1-1 → 2025-2-22
順位 ページタイトル抜粋 アクセス数
アクセスが、ありませんでした! 0
2025/2/23 1:01 更新