Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 621D117F8F for ; Fri, 29 Jan 2016 19:05:15 +0000 (UTC) Received: (qmail 96157 invoked by uid 500); 29 Jan 2016 19:05:15 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 96116 invoked by uid 500); 29 Jan 2016 19:05:15 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 96100 invoked by uid 99); 29 Jan 2016 19:05:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jan 2016 19:05:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B4420E01C1; Fri, 29 Jan 2016 19:05:14 +0000 (UTC) From: rakatyal To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-cli pull request: Add cordova CLI readme docs Content-Type: text/plain Message-Id: <20160129190514.B4420E01C1@git1-us-west.apache.org> Date: Fri, 29 Jan 2016 19:05:14 +0000 (UTC) Github user rakatyal commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/233#discussion_r51300911 --- Diff: doc/readme.md --- @@ -0,0 +1,337 @@ + + +#Cordova Command-line-interface (CLI) Reference + +##Syntax + + cordova command [options] + +##Global Commands + +These commands are available at all times. + +| Command | Description +|----------|-------------- +| create | Create a project +| help | Get help for a command + +##Project Commands + +These commands are supported in a valid Cordova project. + +| Command | Description +|--------------|-------------- +| info | Generate project information +| requirements | Checks and print out all the installation requirements for platforms specified +| platform | Manage project platforms +| plugin | Manage project plugins +| prepare | Copy files into platform(s) for building +| compile | Build platform(s) +| clean | Cleanup project from build artifacts +| run | Run project (including prepare && compile) +| serve | Run project with a local webserver (including prepare) + +##Common options + +These options appply to all cordova-cli commands. + +| Option | Description +|----------------------|------------------------ +| -d or --verbose | Pipe out more verbose output to your shell. You can also subscribe to `log` and `warn` events if you are consuming `cordova-cli` as a node module by calling `cordova.on('log', function() {})` or `cordova.on('warn', function() {})`. +| -v or --version | Print out the version of your `cordova-cli` install. +| --no-update-notifier | will disable updates check. Alternatively set `"optOut": true` in `~/.config/configstore/update-notifier-cordova.json` or set `NO_UPDATE_NOTIFIER` environment variable with any value (see details in [update-notifier docs](https://www.npmjs.com/package/update-notifier#user-settings)). +|--nohooks | suppress executing hooks (taking RegExp hook patterns as parameters) + +##Examples +- The following commands will: + - Create a cordova project in `myApp` directory. + - Add `cordova-plugin-camera` to the project and `config.xml`. + - Add `android` platform to the project + - Check for system requirements for the `android` platform. + - Build the project for the `android` platform and emit verbose output. + - Run the project on `android` emulator or device. + - Build `android` platform using custom signing options. + +``` + cordova create myApp org.apache.cordova.myApp myApp + cordova plugin add cordova-plugin-camera --save + cordova platform add android --save + cordova requirements android + cordova build android --verbose + cordova run android + cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey +``` +##cordova create command + +###Synopsis + +Create the directory structure for the Cordova project in the specified path. + +###Syntax + + cordova create path [id [name [config]]] [options] + +| Value | Description | +|-------|---------------| +| path | Directory which should not already exist. Cordova will create this directory. For more details on the directory structure, see below. | +| id | _Default_: `io.cordova.hellocordova`
Reverse domain-style identifier that maps to `id` attirbute of `widget` element in `config.xml`. This can be changed but there may be code generated using this value, such as Java package names. It is recommended that you select an appropriate value. | +| name | _Default_: `HelloCordova`
Application's display title that maps `name` element in `config.xml` file. This can be changed but there may be code generated using this value, such as Java class names. The default value is `HelloCordova`, but it is recommended that you select an appropriate value. | +| config | JSON string whose key/values will be included in ``/.cordova/config.json | + +###Options + +| Option | Description | +|--------|-------------| +| --template | Use a custom template located locally, in NPM, or GitHub. | +| --copy-from\|--src | _Deprecated_
Use --template instead. Specifies a directory from which to copy the current Cordova project. | +|--link-to | Symlink to specified `www` directory without creating a copy. | + +###Directory structure +A Cordova application built with `cordova-cli` will have the following directory structure: + + myapp/ + |-- config.xml + |-- hooks/ + |-- merges/ + | | |-- android/ + | | |-- blackberry10/ + | | `-- ios/ + |-- www/ + |-- platforms/ + | |-- android/ + | |-- blackberry10/ + | `-- ios/ + `-- plugins/ + +#### `config.xml` +Specifies your application configuration allowing you to customize behavior for your file. See also [conifg.xml reference documentation][config.xml ref] + +#### www/ +Contains the project's web artifacts, such as .html, .css and .js files. As a cordova application developer, most of your code and assets will go here. They will be copied on a `cordova prepare` to each platform's www directory. The www source directory is reproduced within each platform's subdirectory, appearing for example in platforms/ios/www or platforms/android/assets/www. Because the CLI constantly copies over files from the source www folder, you should only edit these files and not the ones located under the platforms subdirectories. If you use version control software, you should add this source www folder, along with the merges folder, to your version control system. --- End diff -- platforms/android/assets/www. appears as a hyperlink due to www. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org