1 |
|
2 | #
|
3 | # Licensed to the Apache Software Foundation (ASF) under one
|
4 | # or more contributor license agreements. See the NOTICE file
|
5 | # distributed with this work for additional information
|
6 | # regarding copyright ownership. The ASF licenses this file
|
7 | # to you under the Apache License, Version 2.0 (the
|
8 | # "License"); you may not use this file except in compliance
|
9 | # with the License. You may obtain a copy of the License at
|
10 | #
|
11 | # http://www.apache.org/licenses/LICENSE-2.0
|
12 | #
|
13 | # Unless required by applicable law or agreed to in writing,
|
14 | # software distributed under the License is distributed on an
|
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16 | # KIND, either express or implied. See the License for the
|
17 | # specific language governing permissions and limitations
|
18 | # under the License.
|
19 | #
|
20 | -->
|
21 |
|
22 | # Cordova CLI
|
23 |
|
24 | [![NPM](https://nodei.co/npm/cordova.png)](https://nodei.co/npm/cordova/)
|
25 |
|
26 | [![Node CI](https://github.com/apache/cordova-cli/workflows/Node%20CI/badge.svg?branch=master)](https://github.com/apache/cordova-cli/actions?query=branch%3Amaster)
|
27 | [![codecov.io](https://codecov.io/github/apache/cordova-cli/coverage.svg?branch=master)](https://codecov.io/github/apache/cordova-cli?branch=master)
|
28 |
|
29 | > The command line tool to build, deploy and manage [Cordova](https://cordova.apache.org)-based applications.
|
30 |
|
31 | [Apache Cordova](https://cordova.apache.org) allows for building native mobile applications using HTML, CSS and JavaScript.
|
32 | This tool helps with management of multi-platform Cordova applications as well as Cordova plugin integration.
|
33 |
|
34 | ## Installation
|
35 |
|
36 | In your command-line on Windows:
|
37 |
|
38 | ```bash
|
39 | c:\> npm install -g cordova
|
40 | ```
|
41 |
|
42 | In your terminal on Mac OS X/Linux:
|
43 |
|
44 | ```bash
|
45 | $sudo npm install -g cordova
|
46 | ```
|
47 |
|
48 | ## Creating a new Cordova project
|
49 |
|
50 | This simple example demonstrates how Cordova CLI can be used to create a `myApp` project with the `camera` plugin and run it for `android` platform:
|
51 |
|
52 | ```bash
|
53 | cordova create myApp com.myCompany.myApp myApp
|
54 | cd myApp
|
55 | cordova plugin add cordova-plugin-camera --save
|
56 | cordova platform add android --save
|
57 | cordova requirements android
|
58 | cordova build android --verbose
|
59 | cordova run android
|
60 | ```
|
61 |
|
62 | ## Docs
|
63 |
|
64 | - [Overview of Cordova]
|
65 | - [Create your first Cordova app] guide
|
66 | - [Full reference docs for Cordova CLI][Reference docs] has details of commands to add platforms, add plugins, build, package, and sign your HTML, JS apps.
|
67 | - Cordova allows you to build apps for a number of platforms. Learn more about our [Supported platforms].
|
68 | - [Project directory structure] documents the details of the directory structure created by Cordova CLI.
|
69 |
|
70 | ## Contributing
|
71 |
|
72 | Cordova is an open source Apache project and contributors are needed to keep this project moving forward. Learn more on
|
73 | [how to contribute on our website][contribute].
|
74 |
|
75 | ## Reporting Issues
|
76 |
|
77 | If you find issues with the Cordova CLI, please follow our guidelines for [reporting issues]. Please bear in mind that most of `cordova-cli`'s functionality is implemented in [cordova-lib], so that could be the place to report your issue.
|
78 | Platform-specific issues should be reported in the relevant repositories, such as [cordova-android] and [cordova-ios].
|
79 |
|
80 | [Overview of Cordova]: http://cordova.apache.org/docs/en/latest/guide/overview/
|
81 | [Create your first Cordova app]: http://cordova.apache.org/docs/en/latest/guide/cli/index.html
|
82 | [Reference docs]: http://cordova.apache.org/docs/en/latest/cordova-cli/index.html
|
83 | [Supported platforms]: http://cordova.apache.org/docs/en/latest/guide/support/index.html
|
84 | [Project directory structure]: http://cordova.apache.org/docs/en/latest/cordova-cli/index.html#directory-structure
|
85 | [Contribute]: http://cordova.apache.org/contribute/
|
86 | [Reporting issues]: http://cordova.apache.org/contribute/issues.html
|
87 | [cordova-lib]: https://github.com/apache/cordova-lib
|
88 | [cordova-android]: https://github.com/apache/cordova-android
|
89 | [cordova-ios]: https://github.com/apache/cordova-ios
|