blob: ee0ee5c9edbffe46391d9cbcf83c8949f6f178e4 [file] [log] [blame]
{
"author": {
"name": "Andrew Lunny",
"email": "alunny@gmail.com"
},
"name": "plugman",
"description": "install/uninstall Cordova plugins",
"version": "0.9.10",
"repository": {
"type": "git",
"url": "git://git-wip-us.apache.org/repos/asf/cordova-plugman.git"
},
"bugs": {
"url": "https://issues.apache.org/jira/browse/CB",
"email": "dev@cordova.apache.org"
},
"main": "plugman.js",
"engines": {
"node": ">=0.9.9"
},
"engineStrict": true,
"dependencies": {
"nopt": "1.0.x",
"glob": "3.2.x",
"elementtree": "0.1.5",
"xcode": "0.6.1",
"plist": "0.4.x",
"bplist-parser": "0.0.x",
"shelljs": "0.1.x",
"osenv": "0.0.x",
"ncallbacks": "1.1.0",
"underscore": "1.4.4",
"dep-graph": "1.1.0",
"semver": "2.0.x"
},
"devDependencies": {
"jasmine-node": "1.7.0"
},
"bin": {
"plugman": "./main.js"
},
"scripts": {
"test": "jasmine-node --color spec"
},
"contributors": [
{
"name": "Anis Kadri"
},
{
"name": "Tim Kim"
},
{
"name": "Braden Shepherdson"
},
{
"name": "Ryan Willoughby"
},
{
"name": "Brett Rudd"
},
{
"name": "Mike Reinstein"
},
{
"name": "Shazron Abdullah"
},
{
"name": "Steve Gill"
},
{
"name": "Fil Maj"
},
{
"name": "Michael Brooks"
},
{
"name": "Jesse MacFadyen"
}
],
"readme": "# plugman\n\nA command line tool to install and uninstall plugins for use with [Apache Cordova](http://cordova.io) projects.\n\nThis document defines tool usage.\n\n## Plugin Specification\n\n--&gt; [plugin_spec.md](plugin_spec.md) &lt;--\n\n## Quickstart\n\n npm install -g plugman\n\n## Design Goals\n\n* Facilitate programmatic installation and manipulation of plugins\n* Detail the dependencies and components of individual plugins\n* Allow code reuse between different target platforms\n\n## Supported Platforms\n\n* iOS\n* Android\n* BlackBerry 10\n* Windows Phone (7+8)\n\n## Command Line Usage\n\n plugman --platform <ios|android|blackberry10|wp7|wp8> --project <directory> --plugin <name|url|path> [--plugins_dir <directory>] [--www <directory>] [--variable <name>=<value> [--variable <name>=<value> ...]]\n plugman --uninstall --platform <ios|android|blackberr10|wp7|wp8> --project <directory> --plugin <id> [--www <directory>] [--plugins_dir <directory>]\n\n* Using minimum parameters, installs a plugin into a cordova project. You must specify a platform and cordova project location for that platform. You also must specify a plugin, with the different `--plugin` parameter forms being:\n * `name`: The directory name where the plugin contents exist. This must be an existing directory under the `--plugins_dir` path (see below for more info).\n * `url`: A URL starting with https:// or git://, pointing to a valid git repository that is clonable and contains a `plugin.xml` file. The contents of this repository would be copied into the `--plugins_dir`.\n * `path`: A path to a directory containing a valid plugin which includes a `plugin.xml` file. This path's contents will be copied into the `--plugins_dir`.\n* `--uninstall`: Uninstalls an already-`--install`'ed plugin from a cordova project. Specify the plugin ID.\n\nOther parameters: \n\n* `--plugins_dir` defaults to `<project>/cordova/plugins`, but can be any directory containing a subdirectory for each fetched plugin.\n* `--www` defaults to the project's `www` folder location, but can be any directory that is to be used as cordova project application web assets.\n* `--variable` allows to specify certain variables at install time, necessary for certain plugins requiring API keys or other custom, user-defined parameters. Please see the [plugin specification](plugin_spec.md) for more information.\n\n## Node Module Usage\n\n node\n > require('plugman')\n { install: [Function: installPlugin],\n uninstall: [Function: uninstallPlugin],\n fetch: [Function: fetchPlugin],\n prepare: [Function: handlePrepare] }\n\n### `install` method\n\n module.exports = function installPlugin(platform, project_dir, id, plugins_dir, subdir, cli_variables, www_dir, callback) {\n\nInstalls a plugin into a specified cordova project of a specified platform.\n\n * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`\n * `project_dir`: path to an instance of the above specified platform's cordova project\n * `id`: a string representing the `id` of the plugin, a path to a cordova plugin with a valid `plugin.xml` file, or an `https://` or `git://` url to a git repository of a valid cordova plugin\n * `plugins_dir`: path to directory where plugins will be stored, defaults to `<project_dir>/cordova/plugins`\n * `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`\n * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values \n * `www_dir`: path to directory where web assets are to be copied to, defaults to the specified project directory's `www` dir (dependent on platform)\n * `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error\n\n### `uninstall` method\n\n module.exports = function uninstallPlugin(platform, project_dir, id, plugins_dir, cli_variables, www_dir, callback) {\n\nUninstalls a previously-installed cordova plugin from a specified cordova project of a specified platform.\n\n * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`\n * `project_dir`: path to an instance of the above specified platform's cordova project\n * `id`: a string representing the `id` of the plugin\n * `plugins_dir`: path to directory where plugins are stored, defaults to `<project_dir>/cordova/plugins`\n * `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`\n * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values \n * `www_dir`: path to directory where web assets are to be copied to, defaults to the specified project directory's `www` dir (dependent on platform)\n * `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error\n\n### `fetch` method\n\nCopies a cordova plugin into a single location that plugman uses to track which plugins are installed into a project.\n\n module.exports = function fetchPlugin(plugin_dir, plugins_dir, link, subdir, git_ref, callback) {\n\n * `plugin_dir`: path or URL to a plugin directory/repository\n * `plugins_dir`: path housing all plugins used in this project\n * `link`: if `plugin_dir` points to a local path, will create a symbolic link to that folder instead of copying into `plugins_dir`, defaults to `false`\n * `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`\n * `gitref`: if `plugin_dir` points to a URL, this value will be used to pass into `git checkout` after the repository is cloned, defaults to `HEAD`\n * `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error\n\n### `prepare` method\n\nFinalizes plugin installation by making configuration file changes and setting up a JavaScript loader for js-module support.\n\n module.exports = function handlePrepare(project_dir, platform, plugins_dir) {\n\n * `project_dir`: path to an instance of the above specified platform's cordova project\n * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`\n * `plugins_dir`: path housing all plugins used in this project\n\n## Example Plugins\n\n- Google has a [bunch of plugins](https://github.com/MobileChromeApps/chrome-cordova/tree/master/plugins) which are maintained actively by a contributor to plugman\n- Adobe maintains plugins for its Build cloud service, which are open sourced and [available on GitHub](https://github.com/phonegap-build)\n- BlackBerry has a [bunch of plugins](https://github.com/blackberry/cordova-blackberry/tree/master/blackberry10/plugins) offering deep platform integration\n\n## Development\n\nBasic installation:\n\n git clone https://git-wip-us.apache.org/repos/asf/cordova-plugman.git\n cd cordova-plugman\n npm install -g\n\nLinking the global executable to the git repo:\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\n### Running Tests\n\n npm test\n\n## Plugin Directory Structure\n\nA plugin is typically a combination of some web/www code, and some native code.\nHowever, plugins may have only one of these things - a plugin could be a single\nJavaScript file, or some native code with no corresponding JavaScript.\n\nHere is a sample plugin named foo with android and ios platforms support, and 2 www assets.\n\n```\nfoo-plugin/\n|- plugin.xml # xml-based manifest\n|- src/ # native source for each platform\n| |- android/\n| | `- Foo.java\n| `- ios/\n| |- CDVFoo.h\n| `- CDVFoo.m\n|- README.md\n`- www/\n |- foo.js\n `- foo.png\n```\n\nThis structure is suggested, but not required.\n\n## Contributors\n\nSee the [package.json](package.json) file for attribution notes.\n\n## License\n\nApache License 2.0\n",
"readmeFilename": "README.md",
"_id": "plugman@0.9.10",
"_from": "plugman@0.9.10"
}