Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: phonegap/phonegap-cli, 489 sao, JavaScript. PhoneGap and PhoneGap/Build command-line interface
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
PhoneGap command-line interface and Node.js library.
Command-line
Requirements
Install node.js version >=4.0.0
Install ios-sim to deploy apps to the iOS simulator.
Install
$ npm install -g phonegap@latest
Getting Started
$ phonegap create my-app # create a PhoneGap project
$ cd my-app # change to project directory
$ phonegap run ios # build and install the app to iOS
Usage
Usage: phonegap [options] [commands]
Description:
PhoneGap command-line tool.
Commands:
create <path> create a phonegap project
build <platform> build the project for specific platform
install <platform> install the project on a specific platform
run <platform> build and install the projectfor specific platform
serve serve a phonegap project
local [command] development on local system
remote [command] development in cloud with phonegap/build
platform [command] update a platform version
help [command] output usage information
version output version number
analytics turn analytics on or off, or view current status
Options:
-d, --verbose allow verbose output
-v, --version output version number
-h, --help output usage information
Platforms:
keyword | local environment | remote environment
-------------------|-------------------|-------------------
android | ✔ | ✔
blackberry10 | ✔ | ✖
ios | ✔ | ✔
wp8 | ✔ | ✔
Examples:
$ phonegap help create
$ phonegap help remote build
$ phonegap create path/to/my-app
$ phonegap remote build android
Local Usage
Usage: phonegap local [command]
Description:
Executes the command on the local system.
This requires that platform SDK is correctly installed.
Commands:
build <platform> build a specific platform
install <platform> install a specific platform
run <platform> build and install a specific platform
plugin <command> add, remove, and list plugins
Examples:
$ phonegap local build android
$ phonegap local run android
$ phonegap local plugin list
Remote Usage
Usage: phonegap remote [command]
Description:
Executes the command remotely using the cloud-based PhoneGap/Build service.
Commands:
login login to PhoneGap/Build
logout logout of PhoneGap/Build
build <platform> build a specific platform
install <platform> install a specific platform
run <platform> build and install a specific platform
Examples:
$ phonegap remote login
$ phonegap remote build android
$ phonegap remote run android
Node Library
Usage
var phonegap = require('phonegap');
App Templates
Templates allow you to create a new app from an existing app template. The
nice part about templates is that they are simply a Cordova-compatible app.
Any existing app can be a template.
You can list the available templates with:
$ phonegap template list
You can create a new project from a template with:
$ phonegap create my-app --template hello-world
Adding a New Template
Adding a new template is easy.
Add your template to the package.json template section.
// the key is your template name (e.g. hello-world)
// the url is a HTTP URL to a .tar.gz.
{
"templates": {
"hello-world": {
"description": "Default hello world app for PhoneGap.",
"url": "https://github.com/phonegap/phonegap-app-hello-world/archive/master.tar.gz"
}
}
}
Send us a pull request!
FAQ
phonegap: command not found
Problem
The PhoneGap CLI installs successfully but you do not have a command phonegap.
Reason
Depending on how node and npm were installed, your globally installed npm
modules may not be in your PATH.
Solution
At the bottom of your npm install -g phonegap@latest installation log, you will see the following:
Update the PhoneGap Hello World App to match the new version.
See Update instructions.
In the above example, we would update the app to 3.1.0.
Manually test that the latest Hello World app is lazy-loaded.
# Link the phonegap-cli for easier development (only need to do once).
$ cd phonegap-cli/
$ [sudo] npm link .
# Manually test and verify hello world app is lazy-loaded.
$ phonegap create my-app
[phonegap] missing library phonegap/www/3.1.0
[phonegap] downloading https://github.com/phonegap/phonegap-app-hello-world/archive/3.1.0.tar.gz...
[phonegap] created project at /Users/mwbrooks/Development/sandbox/my-app
$ cd my-app/
$ phonegap run ios
Push the git commit after the Hello World has been updated.
$ git push phonegap master
Publish the npm release.
$ npm publish
Analytics
Please read our privacy policy for more information on the
data we collect.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/phonegap/phonegap-cli là nguồn chính thức.
phonegap/phonegap-cli có bao nhiêu sao?
phonegap/phonegap-cli có 489 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/phonegap/phonegap-cli. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
phonegap/phonegap-cli có phải mã nguồn mở không?
Có — phonegap/phonegap-cli phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/phonegap/phonegap-cli.
phonegap/phonegap-cli còn đang phát triển không?
Commit gần nhất trên phonegap/phonegap-cli là 4.6 năm trước (theo timestamp GitHub). Repo có 155 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
phonegap/phonegap-cli là gì?
phonegap/phonegap-cli (phonegap/phonegap-cli) là dự án JavaScript trên GitHub. Theo mô tả gốc: PhoneGap and PhoneGap/Build command-line interface
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về phonegap-cli?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về phonegap-cli.