[
https://issues.apache.org/jira/browse/CB-10986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236028#comment-15236028
]
ASF GitHub Bot commented on CB-10986:
-------------------------------------
GitHub user riknoll opened a pull request:
https://github.com/apache/cordova-lib/pull/425
CB-10986: Adding support for scoped npm package plugins
Apparently pre 6.1.0 versions of the CLI were able to add scoped npm
packages, but I don't think we ever supported that feature (if it ever worked,
I'm sure it was very error prone). This adds support for npm scoped packages.
Some notes about the implementation:
* Scoped npm packages, once installed, should be identified by the plugin
ID and not the whole scoped package spec. That means if you run `cordova plugin
add @scope/cordova-plugin-camera`, the entry that appears in `cordova plugin
ls` will be `cordova-plugin-camera` without the scope. If you wanted to remove
the plugin, you would run `cordova plugin remove cordova-plugin-camera` (again
without the scope)
* Scoped npm packages cannot be installed side by side with their un-scoped
counterparts (but I'm not sure why you would want to do that anyway)
* Scoped plugin entries in `config.xml` populate the spec field in this
format: `@scope/plugin-id@version` whereas un-scoped plugins just give the
version
I am afraid this may conflict somewhat with cordova-fetch (but I am unsure).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MSOpenTech/cordova-lib CB-10986
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-lib/pull/425.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #425
----
commit 139bd323c0f6ce74ed17b2e865cd7c3e177052a7
Author: Richard Knoll <[email protected]>
Date: 2016-04-07T17:57:28Z
CB-10986: Adding support for scoped npm package plugins
----
> Unable to install npm scoped plugin with [email protected]
> ----------------------------------------------------------
>
> Key: CB-10986
> URL: https://issues.apache.org/jira/browse/CB-10986
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib
> Affects Versions: 6.1.0
> Reporter: Darryl Pogue
> Assignee: Richard B Knoll
> Labels: regression, reproduced, triaged
>
> {code}
> $ cordova create MyProject
> $ cd ./MyProject
> $ cordova platform add android
> $ cordova plugin add @dpogue/cordova-plugin-crosswalk-webview
> Error: Cannot find plugin.xml for plugin 'plugins'. Please try adding it
> again.
> {code}
> This works as expected with [email protected].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]