Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using cordova plugins in private repos or locally #2925

Closed
matb33 opened this issue Oct 27, 2014 · 15 comments
Closed

Using cordova plugins in private repos or locally #2925

matb33 opened this issue Oct 27, 2014 · 15 comments

Comments

@matb33
Copy link

matb33 commented Oct 27, 2014

Currently, Cordova.depends is hardcoded to look for a URL starting with http/https and a commit hash. I've tried to use one of our private closed-source plugins but I just can't get Meteor to play nice with it. I even resorted to using npm to install it, then tar it, stuffing the commit hash in the filename... but then the regexp ^https? messes it all up...

I then tried copying it in to cordova-build-override/local-plugins/xxx but no joy since I don't have any control over that step -- I can't edit/transform files, just overwrite.

Having a local server just to host this plugin is overkill, and the build is automated and needs to work for the next person.

Anyway I'm at my wits end, I'm trying to get the client to temporarily make the repo public, but that isn't a good long-term solution.

Any thoughts?

@Slava
Copy link
Contributor

Slava commented Oct 27, 2014

This is pretty similar to inability to fetch npm modules from private GitHub repos. The main reason there, as I understand, is inability to lock on certain version by url.

@matb33
Copy link
Author

matb33 commented Oct 27, 2014

Then how about supporting pulling the directory tree of a plugin from the local filesystem? We could then figure out how to get it from the private repo to our disk ourselves (npm, whatever)

edit: this is how I pulled a private repo using npm: http://stackoverflow.com/a/10391718/962223

@Slava
Copy link
Contributor

Slava commented Oct 27, 2014

We realize it is a huge pain both in development and production. We don't have a good solution right now for 1.0, we will address it later.

@justinsb
Copy link
Contributor

So we can understand the use-case, what is your preferred means to access the code? Is it an SSH 'git@github.com...' URL?

@matb33
Copy link
Author

matb33 commented Oct 27, 2014

Honestly at this point, I'd prioritize local filesystem. The developer is then free to obtain the plugin code in whichever manner suits their workflow.

@tdesc
Copy link

tdesc commented Oct 30, 2014

+1 for local filesystem
We have our own WebRTC plugin for iOS and it's huge as 1gb

@matb33
Copy link
Author

matb33 commented Nov 10, 2014

Any chance this can be looked at soon? We're developing a cordova plugin, and the only way to test it within meteor is to commit and push to a public repo. It's beyond painful. Can the regex at least be relaxed a little bit to allow filesystem access? Perhaps not enforcing the ^https? part? Paired with this, I can post an npm-based temporary solution here until you guys work out a more final solution.

@Slava
Copy link
Contributor

Slava commented Nov 10, 2014

Both Justin and I are working on different projects. This issue is not prioritized.

@avital
Copy link
Contributor

avital commented Nov 10, 2014

In the meanwhile the easiest option might be to patch Meteor as needed and
run from a check-out instead. You can even publish your own release of
Meteor, as described in
http://practicalmeteor.com/using-meteor-publish-release-to-extend-the-meteor-command-line-tool/

On Mon, Nov 10, 2014 at 1:42 PM, Slava Kim notifications@github.com wrote:

Both Justin and I are working on different projects. This issue is not
prioritized.


Reply to this email directly or view it on GitHub
#2925 (comment).

@shirk3y
Copy link

shirk3y commented Jan 6, 2015

+1 for using plugins from local files. It would be also cool if plugin will be re-loaded after its code is changed.

@dgtlife
Copy link

dgtlife commented Feb 14, 2015

+1 for local repo.

From README of com.phonegap.plugins.facebookconnect:

Installing this plugin directly from Cordova Registry results in Xcode using a broken FacebookSDK.framework, this is because the current publish procedure to NPM breaks symlinks CB-6092. Please install the plugin through a locally cloned copy or re-add the FacebookSDK.framework to Xcode after installation."

And, yes, while the tarball installatiom works for this Facebook plugin case, the need to add local/private packages is still something that would arise.

@nerdmed nerdmed mentioned this issue Mar 10, 2015
23 tasks
@dotnetwise
Copy link

+1

1 similar comment
@jrhone
Copy link

jrhone commented Apr 17, 2015

+1

@dekel1207
Copy link

+1 Any prediction on when this will get priority? Thanks!

@Slava
Copy link
Contributor

Slava commented May 22, 2015

This feature was implemented in this PR: #4229

Afaik it is app-level only, but I think it is the most sane implementation. I don't think we can come up with a good semantics of a published package depending on a local plugin.

@Slava Slava closed this as completed May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests