-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
153 lines (153 loc) · 20.7 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{
"name": "cordova",
"version": "4.3.0",
"preferGlobal": "true",
"description": "Cordova command line interface tool",
"main": "cordova",
"engines": {
"node": ">=0.9.9"
},
"engineStrict": true,
"bin": {
"cordova": "./bin/cordova"
},
"scripts": {
"test": "node node_modules/jasmine-node/bin/jasmine-node --captureExceptions --color spec",
"cover": "node node_modules/istanbul/lib/cli.js cover --root src --print detail node_modules/jasmine-node/bin/jasmine-node -- spec"
},
"repository": {
"type": "git",
"url": "https://git-wip-us.apache.org/repos/asf/cordova-cli.git"
},
"bugs": {
"url": "https://issues.apache.org/jira/browse/CB",
"email": "dev@cordova.apache.org"
},
"keywords": [
"cordova",
"client",
"cli"
],
"dependencies": {
"cordova-lib": "4.3.0",
"q": "1.0.1",
"nopt": "3.0.1",
"underscore": "1.7.0"
},
"devDependencies": {
"istanbul": "^0.3.4",
"grunt": "0.4.5",
"grunt-retire": "0.3.7",
"jasmine-node": "1.14.5"
},
"author": {
"name": "Anis Kadri"
},
"contributors": [
{
"name": "Brian LeRoux",
"email": "b@brian.io"
},
{
"name": "Fil Maj",
"email": "maj.fil@gmail.com"
},
{
"name": "Mike Reinstein",
"email": "reinstein.mike@gmail.com"
},
{
"name": "Darry Pogue",
"email": "darryl@dpogue.ca"
},
{
"name": "Michael Brooks",
"email": "michael@michaelbrooks.ca"
},
{
"name": "Braden Shepherdson",
"email": "braden@chromium.org"
},
{
"name": "Gord Tanner",
"email": "gtanner@gmail.com"
},
{
"name": "Tim Kim",
"email": "timk@adobe.com"
},
{
"name": "Benn Mapes",
"email": "Benn.Mapes@gmail.com"
},
{
"name": "Michael Wolf",
"email": "Michael.Wolf@Cynergy.com"
},
{
"name": "Andrew Grieve",
"email": "agrieve@chromium.org"
},
{
"name": "Bryan Higgins",
"email": "bhiggins@blackberry.com"
},
{
"name": "Don Coleman",
"email": "dcoleman@chariotsolutions.com"
},
{
"name": "Germano Gabbianelli",
"email": "tyron.mx@gmail.com"
},
{
"name": "Ian Clelland",
"email": "iclelland@chromium.org"
},
{
"name": "Lucas Holmqust",
"email": "lholmqui@redhat.com"
},
{
"name": "Matt LeGrand",
"email": "mlegrand@gmail.com"
},
{
"name": "Michal Mocny",
"email": "mmocny@gmail.com"
},
{
"name": "Sam Breed",
"email": "sam@quickleft.com"
},
{
"name": "Tommy-Carlos Williams",
"email": "tommy@devgeeks.org"
},
{
"name": "Rubén Norte",
"email": "rubennorte@gmail.com"
},
{
"name": "Germano Gabbianelli",
"email": "tyrion.mx@gmail.com"
},
{
"name": "Steven Gill",
"email": "stevengill97@gmail.com"
},
{
"name": "Jesse",
"email": "purplecabbage@gmail.com"
}
],
"license": "Apache version 2.0",
"readme": "<!--\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n-->\n\n# cordova-cli\n\n> The command line tool to build, deploy and manage [Cordova](http://cordova.io)-based applications.\n\n[Apache Cordova](http://cordova.io) allows for building native mobile applications using HTML, CSS and JavaScript. This tool helps with management of multi-platform Cordova applications as well as Cordova plugin integration.\n\nCheck out the [Getting Started guides](http://cordova.apache.org/docs/en/edge/) for more details on how to work with Cordova sub-projects.\n\n# Supported Cordova Platforms\n\n- Amazon Fire OS\n- Android\n- BlackBerry 10\n- iOS\n- Ubuntu\n- Windows Phone 8\n- Windows 8\n\n# Requirements\n\n* [Node.js](http://nodejs.org/)\n* SDKs for each platform you wish to support:\n - **Android**: [Android SDK](http://developer.android.com) - **NOTE** This tool\n will not work unless you have the absolute latest updates for all\n Android SDK components. Also you will need the SDK's `tools` and `platform-tools` directories on your __system path__ otherwise Android support will fail.\n - **amazon-fireos**: [Amazon Fire OS SDK](https://developer.amazon.com/public/solutions/platforms/android-fireos/docs/building-and-testing-your-hybrid-app) - **NOTE** This tool will not work unless you have Android SDK installed and paths are updated as mentioned above. In addition you need to install AmazonWebView SDK and copy awv_interface.jar on **Mac/Linux** system to ~/.cordova/lib/commonlibs folder or on **Windows** %USERPROFILE%/.cordova/lib/coomonlibs. If commonlibs folder does not exist then create one.\n - [Windows Phone SDK](http://dev.windowsphone.com/en-us/downloadsdk) - **NOTE** This tool will not work unless you have `msbuild` on your __system path__ otherwise Windows Phone support will fail (`msbuild.exe` is generally located in `C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319`).\n - **BlackBerry 10**: [BlackBerry 10 WebWorks SDK](http://developer.blackberry.com/html5/download/). Make sure you have the `dependencies/tools/bin` folder inside the SDK directory added to your path!\n - **iOS**: [iOS SDK](http://developer.apple.com) with the latest `Xcode` and `Xcode Command Line Tools`\n - **Windows Phone**: [Windows Phone SDK](http://dev.windowsphone.com/en-us/downloadsdk) - **NOTE** This tool will not work unless you have `msbuild` on your __system path__ otherwise Windows Phone support will fail (`msbuild.exe` is generally located in `C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319`).\n\n`cordova-cli` has been tested on **Mac OS X**, **Linux**, **Windows 7**, and **Windows 8**.\n\nPlease note that some platforms have OS restrictions. For example, you cannot build for Windows 8 or Windows Phone 8 on Mac OS X, nor can you build for iOS on Windows.\n\n# Install\n\nUbuntu packages are available in a PPA for Ubuntu 13.10 (Saucy) (the current release) as well as 14.04 (Trusty) (under development).\n\n sudo apt-add-repository ppa:cordova-ubuntu/ppa\n sudo apt-get update\n sudo apt-get install cordova-cli\n npm install -g cordova\n\nTo build an application for the Ubuntu platform, the following extra packages are required:\n\n sudo apt-get install cmake debhelper libx11-dev libicu-dev pkg-config qtbase5-dev qtchooser qtdeclarative5-dev qtfeedback5-dev qtlocation5-dev qtmultimedia5-dev qtpim5-dev qtsensors5-dev qtsystems5-dev\n\n\n## Installing from master\n\nYou'll need to install both [CLI](https://git-wip-us.apache.org/repos/asf/cordova-cli.git) and [Plugman](https://git-wip-us.apache.org/repos/asf/cordova-plugman.git) from `git`. Running the *npm version* of one and *(git) master version* of the other is likely to end with you suffering.\n\nTo avoid using sudo, see [Get away from sudo: npm without root](http://justjs.com/posts/npm-link-developing-your-own-npm-modules-without-tears).\n\nRun the following commands:\n\n git clone https://git-wip-us.apache.org/repos/asf/cordova-plugman.git\n cd cordova-plugman\n npm install\n sudo npm link\n cd ..\n git clone https://git-wip-us.apache.org/repos/asf/cordova-cli.git\n cd cordova-cli\n npm install\n sudo npm link\n npm link plugman\n\nNow the `cordova` and `plugman` in your path are the local git versions. Don't forget to keep them up to date!\n\n## Installing on Ubuntu\n\n apt-get install cordova-cli\n\n\n# Getting Started\n\n`cordova-cli` has a single global `create` command that creates new Cordova projects into a specified directory. Once you create a project, `cd` into it and you can execute a variety of project-level commands. Completely inspired by git's interface.\n\n## Global Commands\n\n- `help` display a help page with all available commands\n- `create <directory> [<id> [<name>]]` create a new Cordova project with optional name and id (package name, reverse-domain style)\n\n<a name=\"project_commands\" />\n## Project Commands\n\n- `platform [ls | list]` list all platforms for which the project will build\n- `platform add <platform> [<platform> ...]` add one (or more) platforms as a build target for the project\n- `platform [rm | remove] <platform> [<platform> ...]` removes one (or more) platform build targets from the project\n- `platform [up | update] <platform> ` - updates the Cordova version used for the given platform\n- `plugin [ls | list]` list all plugins included in the project\n- `plugin add <path-to-plugin> [<path-to-plugin> ...]` add one (or more) plugins to the project\n- `plugin [rm | remove] <plugin-name> [<plugin-name> ...]` remove one (or more) plugins from the project.\n- `plugin search [<keyword1> <keyword2> ...]` search the plugin registry for plugins matching the list of keywords\n- `prepare [platform...]` copies files into the specified platforms, or all platforms. It is then ready for building by `Eclipse`, `Xcode`, etc.\n- `compile [platform...]` compiles the app into a binary for each targetted platform. With no parameters, builds for all platforms, otherwise builds for the specified platforms.\n- `build [<platform> [<platform> [...]]]` an alias for `cordova prepare` followed by `cordova compile`\n- `emulate [<platform> [<platform> [...]]]` launch emulators and deploy app to them. With no parameters emulates for all platforms added to the project, otherwise emulates for the specified platforms\n- `serve [port]` launch a local web server allowing you to access each platform's www directory on the given port (default 8000).\n\n### Optional Flags\n\n- `-d` or `--verbose` will 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() {})`.\n- `-v` or `--version` will print out the version of your `cordova-cli` install.\n\n# Project Directory Structure\nA Cordova application built with `cordova-cli` will have the following directory structure:\n\n myApp/\n |-- config.xml\n |-- hooks/\n |-- merges/\n | | |-- android/\n | | |-- blackberry10/\n | | `-- ios/\n |-- www/\n |-- platforms/\n | |-- android/\n | |-- blackberry10/\n | `-- ios/\n `-- plugins/\n\n## hooks/\nThis directory may contains scripts used to customize cordova-cli commands. This\ndirectory used to exist at `.cordova/hooks`, but has now been moved to the\nproject root. Any scripts you add to these directories will be executed before\nand after the commands corresponding to the directory name. Useful for\nintegrating your own build systems or integrating with version control systems.\n\nRefer to [hooks-README.md](https://github.com/apache/cordova-lib/blob/master/cordova-lib/templates/hooks-README.md) for more information.\n\n## merges/\nPlatform-specific web assets (HTML, CSS and JavaScript files) are contained within appropriate subfolders in this directory. These are deployed during a `prepare` to the appropriate native directory. Files placed under `merges/` will override matching files in the `www/` folder for the relevant platform. A quick example, assuming a project structure of:\n\n merges/\n |-- ios/\n | `-- app.js\n |-- android/\n | `-- android.js\n www/\n `-- app.js\n\nAfter building the Android and iOS projects, the Android application will contain both `app.js` and `android.js`. However, the iOS application will only contain an `app.js`, and it will be the one from `merges/ios/app.js`, overriding the \"common\" `app.js` located inside `www/`.\n\n## www/\n\nContains the project's web artifacts, such as .html, .css and .js files. These are your main application assets. They will be copied on a `cordova prepare` to each platform's www directory.\n\n### Your Blanket: config.xml\n\nThis file is what you should be editing to modify your application's metadata. Any time you run any cordova-cli commands, the tool will look at the contents of `config.xml` and use all relevant info from this file to define native application information. cordova-cli supports changing your application's data via the following elements inside the `config.xml` file:\n\n- The user-facing name can be modified via the contents of the `<name>` element.\n- The package name (AKA bundle identifier or application id) can be modified via the `id` attribute from the top-level `<widget>` element.\n- The version can be modified via the `version` attribute from the top-level `<widget>` element.\n- The whitelist can be modified using the `<access>` elements. Make sure the `origin` attribute of your `<access>` element points to a valid URL (you can use `*` as wildcard). For more information on the whitelisting syntax, see the [docs.phonegap.com](http://docs.phonegap.com/en/2.2.0/guide_whitelist_index.md.html#Domain%20Whitelist%20Guide). You can use either attribute `uri` ([BlackBerry-proprietary](https://developer.blackberry.com/html5/documentation/access_element_834677_11.html)) or `origin` ([standards-compliant](http://www.w3.org/TR/widgets-access/#attributes)) to denote the domain.\n- Platform-specific preferences can be customized via `<preference>` tags. See [docs.phonegap.com](http://docs.phonegap.com/en/2.3.0/guide_project-settings_index.md.html#Project%20Settings) for a list of preferences you can use.\n- The entry/start page for your application can be defined via the `<content src>` element + attribute.\n\n## platforms/\nPlatforms added to your application will have the native application project structures laid out within this directory.\n\n## plugins/\nAny added plugins will be extracted or copied into this directory.\n\n# Hooks\n\nProjects created by cordova-cli have `before` and `after` hooks for each [project command](#project_commands).\n\nThere are two types of hooks: project-specific ones and module-level ones. Both of these types of hooks receive the project root folder as a parameter.\n\n## Project-specific Hooks\n\nThese are located under the `hooks` directory in the root of your Cordova project. Any scripts you add to these directories will be executed before and after the appropriate commands. Useful for integrating your own build systems or integrating with version control systems. __Remember__: make your scripts executable.\n\n### Examples\n\n- [`before_build` hook for jade template compiling](https://gist.github.com/4100866) courtesy of [dpogue](http://github.com/dpogue)\n\n## Module-level Hooks\n\nIf you are using cordova-cli as a module within a larger **Node** application, you can also use the standard `EventEmitter` methods to attach to the events. The events include `before_build`, `before_compile`, `before_docs`, `before_emulate`, `before_run`, `before_platform_add`, `before_library_download`, `before_platform_ls`, `before_platform_rm`, `before_plugin_add`, `before_plugin_ls`, `before_plugin_rm` and `before_prepare`. There is also a `library_download` progress event. Additionally, there are `after_` flavours of all the above events.\n\nOnce you `require('cordova')` in your Node project, you will have the usual `EventEmitter` methods available (`on`, `off` or `removeListener`, `removeAllListeners`, and `emit` or `trigger`).\n\n# Examples\n\n## Creating a new Cordova project\nThis example shows how to create a project from scratch named KewlApp with iOS and Android platform support, and includes a plugin named Kewlio. The project will live in ~/KewlApp\n\n cordova create ~/KewlApp KewlApp\n cd ~/KewlApp\n cordova platform add ios android\n cordova plugin add http://example.org/Kewlio-1.2.3.tar.gz\n cordova build\n\nThe directory structure of KewlApp now looks like this:\n\n KewlApp/\n |-- hooks/\n |-- merges/\n | |-- android/\n | `-- ios/\n |-- www/\n | `-- index.html\n |-- platforms/\n | |-- android/\n | | `-- …\n | `-- ios/\n | `-- …\n `-- plugins/\n `-- Kewlio/\n\n# Contributing\n\n## Running Tests\n\n npm test\n\n## Get test coverage reports\n\n npm run cover\n\n## TO-DO + Issues\n\nPlease check [Cordova issues with the CLI Component](http://issues.cordova.io). If you find issues with this tool, please be so kind as to include relevant information needed to debug issues such as:\n\n- Your operating system and version\n- The application name, directory location, and identifier used with `create`\n- Which mobile SDKs you have installed, and their versions. Related to this: which `Xcode` version if you are submitting issues related to iOS\n- Any error stack traces you received\n\n## Contributors\n\nThanks to everyone for contributing! For a list of people involved, please see the `package.json` file.\n\n\n# Known Issues and Troubleshooting\n\n## Any OS\n\n### Proxy Settings\n\n`cordova-cli` will use `npm`'s proxy settings. If you downloaded cordova-cli via `npm` and are behind a proxy, chances are cordova-cli should work for you as it will use those settings in the first place. Make sure that the `https-proxy` and `proxy` npm config variables are set properly. See [npm's configuration documentation](https://npmjs.org/doc/config.html) for more information.\n\n## Windows\n\n### Trouble Adding Android as a Platform\n\nWhen trying to add a platform on a Windows machine if you run into the following error message:\n Cordova library for \"android\" already exists. No need to download. Continuing.\n Checking if platform \"android\" passes minimum requirements...\n Checking Android requirements...\n Running \"android list target\" (output to follow)\n\n Error: The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added t\n o your path. Output:\n at C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\cordova\\src\\platform.js:185:42\n at C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\cordova\\src\\metadata\\android_parser.js:50:13\n at C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\cordova\\node_modules\\shelljs\\shell.js:1707:7\n at exithandler (child_process.js:633:7)\n at ChildProcess.errorhandler (child_process.js:649:5)\n at ChildProcess.EventEmitter.emit (events.js:95:17)\n at Process.ChildProcess._handle.onexit (child_process.js:787:12)\n\nrun the command `android list target`. If you see:\n\n 'xcopy' is not recognized as an internal or external command,\n operable program or batch file.\n\nat the beginning of the command output, it means you will need to fix your Windows Path variable to include xcopy. This location is typically under C:\\Windows\\System32.\n\n## Windows 8\n\nWindows 8 support does not include the ability to launch/run/emulate, so you will need to open **Visual Studio** to see your app live. You are still able to use the following commands with windows8:\n\n- `platform add windows8`\n- `platform remove windows8`\n- `prepare windows8`\n- `compile windows8`\n- `build windows8`\n\nTo run your app, you will need to open the `.sln` in the `platforms/windows8` folder using **Visual Studio 2012**.\n\n**Visual Studio** will tell you to reload the project if you run any of the above commands while the project is loaded.\n\n## Amazon Fire OS\n\nAmazon Fire OS does not include the ability to emulate. You are still able to use the following commands with Amazon Fire OS\n\n- `platform add amazon-fireos`\n- `platform remove amazon-fireos`\n- `prepare amazon-fireos`\n- `compile amazon-fireos`\n- `build amazon-fireos`\n\n## Ubuntu\n\nThe initial release of cordova-ubuntu does not support building applications for armhf devices automatically. It is possible to produce applications and click packages in a few steps though.\n\nThis bug report documents the issue and solutions for it: https://bugs.launchpad.net/ubuntu/+source/cordova-ubuntu/+bug/1260500 A future release will let developers cross-compile armhf click packages directly from an x86 desktop.\n\n## Firefox OS\n\nFirefox OS does not include the ability to emulate, run and serve. After building, you will have to open the firefoxos platform directory of your app in the App Manager that comes with every firefox browser. \n",
"readmeFilename": "README.md",
"_id": "cordova@4.3.0",
"dist": {
"shasum": "b1ae4aefb693ff47a2cd45129a6aa6d4f4d0a3e9"
},
"_from": "cordova@",
"_resolved": "https://registry.npmjs.org/cordova/-/cordova-4.3.0.tgz"
}