Search code examples
cordovacordova-cli

show Cordova plugins search results in command line


As of the new update of Cordova to 6.0.0 from last Thursday the command cordova plugin search whateverSearchTerm results in a new browser window opening to show me the search results on their web page instead of writing a list to the command line.

I used to show the output of the command in a Java application. So now I don't get a String from the command but instead the browser opens and the user can't just choose from a list of plugins.

So my question is: How do I get the list of plugins being put out as a String in my command line instead of a browser opening? I know I could somehow try to parse the page shown in browser but that seems kinda like an overkill to me. I hope someone can help me on this issue :)


Solution

  • you can use npm search command

    Example

    npm search cordova camera
    

    Or you can use the cordova-plugins npm package that search plugins on plugreg.com and http://registry.cordova.io/

    Install it with

    npm install -g cordova-plugins
    

    And use it with

    cordova-plugins search camera
    

    https://www.npmjs.com/package/cordova-plugins