MR. Kumar
MR. Kumar

Reputation: 679

Cordova 3.5.0 how to add Custom plugin Using CLI?

I am using cordova3.5.0 and i want to add my custom plugin to my project using CLI .I don't know what is the procedure to add own plugin to my project.Although i can add their native plugin simply type cordova add plugin org.apache.cordova.camera.

Upvotes: 3

Views: 3891

Answers (6)

Maheshvirus
Maheshvirus

Reputation: 7553

To install custom plugin through CLI use below command

cordova plugin add (Add your plugin path here)

Eg.

cordova plugin add C:\Users\project\custom_camera_plugin

Upvotes: 1

vishu handa
vishu handa

Reputation: 29

you can find good documentation in this link

https://taco.visualstudio.com/en-us/docs/createplugintutorial/

however after making your own plugin you can edit your java and javascript file and publish it to npm again by updating version in npm using npm version patch and npm publish .

and hence by this you can use it

however if you want to make it without publishing it on npm then i also dont know that if you find then please tell? (Respond back in case of any questions)

Upvotes: 0

imhank
imhank

Reputation: 1

You should use plugman to manage custom plugins.

To install:

$ plugman install --platform <ios|android|blackberry10|wp8> --project <directory> --plugin <name|url|path> [--plugins_dir <directory>] [--www <directory>] [--variable <name>=<value> [--variable <name>=<value> ...]]

Upvotes: 0

MR. Kumar
MR. Kumar

Reputation: 679

After lot of R&D i found there is only solution ,We can add custom plugin only manually not using CLI.

Upvotes: 2

Vignesh Kumar
Vignesh Kumar

Reputation: 598

try using GIT Url. example : $ cordova plugin add https://github.com/apache/cordova-plugin-console.git

Upvotes: 0

Dick van den Brink
Dick van den Brink

Reputation: 14567

You can just type cordova plugin add

Just point it to an directory with a valid plugin.xml. See documentation for the plugin.xml here: http://docs.phonegap.com/en/3.5.0/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide

Cordova help says the following: plugin add [ ...] .......... SPEC can be a plugin ID, a local path, or a git URL.

Upvotes: 3

Related Questions