Comparing version 0.16.0 to 0.17.0
@@ -11,3 +11,3 @@ plugman manages plugin.xml-compatible cordova plugins into cordova-generated projects. | ||
Parameters: | ||
Parameters: | ||
@@ -40,3 +40,3 @@ - platform <platform>: One of android, ios, blackberry10, wp7 or wp8 | ||
--version|-v : Displays version | ||
--version|-v : Displays version | ||
@@ -64,3 +64,3 @@ Interacting with the registry | ||
$ plugman search plugin,keywords | ||
$ plugman search <keyword1 keyword2 ...> | ||
@@ -81,4 +81,4 @@ Display plugin information | ||
$ plugman owner ls org.apache.cordova.core.file | ||
$ plugman owner ls org.apache.cordova.core.file | ||
$ plugman owner add username org.apache.cordova.core.file | ||
$ plugman owner rm username org.apache.cordova.core.file |
@@ -5,3 +5,3 @@ { | ||
"description": "install/uninstall Cordova plugins", | ||
"version": "0.16.0", | ||
"version": "0.17.0", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -34,3 +34,7 @@ # plugman | ||
## Command Line Usage | ||
plugman help | ||
* Displays all available plugman commands | ||
plugman install --platform <ios|amazon-fireos|android|blackberry10|wp7|wp8> --project <directory> --plugin <name|url|path> [--plugins_dir <directory>] [--www <directory>] [--variable <name>=<value> [--variable <name>=<value> ...]] | ||
@@ -45,3 +49,3 @@ plugman uninstall --platform <ios|amazon-fireos|android|blackberr10|wp7|wp8> --project <directory> --plugin <id> [--www <directory>] [--plugins_dir <directory>] | ||
Other parameters: | ||
Other parameters: | ||
@@ -52,3 +56,15 @@ * `--plugins_dir` defaults to `<project>/cordova/plugins`, but can be any directory containing a subdirectory for each fetched plugin. | ||
plugman search <plugin keywords> | ||
* Search the [Plugin registry](http://plugins.cordova.io) for plugin id's that match the given space separated list of keywords. | ||
plugman config set registry <url-to-registry> | ||
plugman config get registry | ||
* Get or set the URL of the current plugin registry that plugman is using. Generally you should leave this set at http://registry.cordova.io unless you want to use a third party plugin registry. | ||
## Node Module Usage | ||
This section details how to consume Plugman as a node module and is only for Cordova tool authors and other hackers. You should not need to read this section if you are just using Plugman to manage a Cordova project. | ||
@@ -77,3 +93,3 @@ node | ||
* `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.` | ||
* `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values | ||
* `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values | ||
* `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) | ||
@@ -93,3 +109,3 @@ * `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 | ||
* `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.` | ||
* `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values | ||
* `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values | ||
* `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) | ||
@@ -150,3 +166,3 @@ * `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 | ||
Configures registry settings. `params` is an array that describes the action | ||
/* | ||
/* | ||
* var params = ['get', 'registry']; | ||
@@ -153,0 +169,0 @@ * var params = ['set', 'registry', 'http://registry.cordova.io']; |
@@ -44,2 +44,8 @@ var platforms = require('../src/platforms'), | ||
}); | ||
it('should create cordova_plugins.js file in a custom www directory', function() { | ||
var custom_www = path.join(temp, 'assets', 'custom_www'), | ||
js = path.join(temp, 'assets', 'custom_www', 'cordova_plugins.js'); | ||
prepare(temp, 'android', plugins_dir, custom_www); | ||
expect(write).toHaveBeenCalledWith(js, jasmine.any(String), 'utf-8'); | ||
}); | ||
describe('handling of js-modules', function() { | ||
@@ -46,0 +52,0 @@ var read, child_one; |
@@ -276,5 +276,5 @@ var path = require('path'), | ||
if (err.code == 128) { | ||
return d.reject(new Error('Error: Plugin ' + plugin_id + ' is not in git repository. All plugins must be in a git repository.')); | ||
return d.reject(new Error('Plugin ' + plugin_id + ' is not in git repository. All plugins must be in a git repository.')); | ||
} else { | ||
return d.reject(new Error('Error trying to locate git repository for plugin.')); | ||
return d.reject(new Error('Failed to locate git repository for ' + plugin_id + ' plugin.')); | ||
} | ||
@@ -386,3 +386,3 @@ } | ||
// call prepare after a successful install | ||
require('./../plugman').prepare(project_dir, platform, plugins_dir); | ||
require('./../plugman').prepare(project_dir, platform, plugins_dir, www_dir); | ||
@@ -389,0 +389,0 @@ require('../plugman').emit('log', plugin_id + ' installed on ' + platform + '.'); |
@@ -9,3 +9,4 @@ module.exports = { | ||
'windows8' : require('./platforms/windows8'), | ||
'firefoxos': require('./platforms/firefoxos') | ||
'firefoxos': require('./platforms/firefoxos'), | ||
'ubuntu': require('./platforms/ubuntu') | ||
}; |
@@ -37,3 +37,3 @@ /** | ||
// a path to where the plugins are downloaded, the www dir, and the platform ('android', 'ios', etc.). | ||
module.exports = function handlePrepare(project_dir, platform, plugins_dir) { | ||
module.exports = function handlePrepare(project_dir, platform, plugins_dir, www_dir) { | ||
// Process: | ||
@@ -50,3 +50,3 @@ // - Do config munging by calling into config-changes module | ||
var platform_json = config_changes.get_platform_json(plugins_dir, platform); | ||
var wwwDir = platform_modules[platform].www_dir(project_dir); | ||
var wwwDir = www_dir || platform_modules[platform].www_dir(project_dir); | ||
@@ -53,0 +53,0 @@ // Check if there are any plugins queued for uninstallation, and if so, remove any of their plugin web assets loaded in |
@@ -29,3 +29,3 @@ var npm = require('npm'), | ||
if(res.statusCode != 200) { | ||
d.reject(new Error('error: Could not fetch package information for '+name)); | ||
d.reject(new Error('Failed to fetch package information for '+name)); | ||
} else { | ||
@@ -32,0 +32,0 @@ var info = ''; |
@@ -17,3 +17,5 @@ module.exports = [ | ||
'org.apache.cordova.console', | ||
'org.apache.cordova.camera' | ||
'org.apache.cordova.camera', | ||
'org.apache.cordova.device-motion', | ||
'org.apache.cordova.battery-status' | ||
] |
@@ -193,5 +193,5 @@ var path = require('path'), | ||
// call prepare after a successful uninstall | ||
require('./../plugman').prepare(project_dir, platform, plugins_dir); | ||
require('./../plugman').prepare(project_dir, platform, plugins_dir, www_dir); | ||
}); | ||
} | ||
@@ -463,3 +463,5 @@ /* | ||
if (file == 'config.xml') { | ||
if (platform == 'android') { | ||
if (platform == 'ubuntu') { | ||
filepath = path.join(project_dir, 'config.xml'); | ||
} else if (platform == 'android') { | ||
filepath = path.join(project_dir, 'res', 'xml', 'config.xml'); | ||
@@ -466,0 +468,0 @@ } else { |
@@ -43,7 +43,7 @@ /* | ||
var cmd = util.format('git clone "%s" "%s"', plugin_git_url, path.basename(tmp_dir)); | ||
var cmd = util.format('git clone "%s" "%s"', plugin_git_url, tmp_dir); | ||
require('../../plugman').emit('verbose', 'Fetching plugin via git-clone command: ' + cmd); | ||
var d = Q.defer(); | ||
child_process.exec(cmd, { cwd: path.dirname(tmp_dir) }, function(err, stdout, stderr) { | ||
child_process.exec(cmd, function(err, stdout, stderr) { | ||
if (err) { | ||
@@ -50,0 +50,0 @@ d.reject(err); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3462878
296
21227
225
58