-
Notifications
You must be signed in to change notification settings - Fork 28
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
Plugin dependencies (using npm)? #38
Comments
FYI I have a version of the sqlite plugin using npm in a It is now working for Android, iOS, and Windows platforms. I am able to declare the external dependency in Next week I will adapt the cordova-sqlite-ext version to fetch its dependencies this way. If this is working I will also adapt the main Cordova-sqlite-storage version to fetch its dependencies this way which will needed to include the Windows support. I really want to thank @vjrantal and some others from the AllJoyn team for the hard work they did 1-2 years ago to get their plugin working on Android/iOS/Windows. Their work has really made it possible for me to integrate the Windows 8.1/Windows Phone 8.1 support last year and get this I am very happy to have found a solution that lets me declare an external dependency in |
the --fetch work (apache/cordova-lib#407) will allow this by default! It will npm install your plugin (which will install all of the declared deps in package.json). Our current implementation does |
@stevengill I will give your --fetch work a try when I get a chance. |
For the sqlite plugin I would rather not depend on the user adding a "--fetch" flag as discussed in #33 / Apache CB-9858. |
Yeah, I'd recommend keeping your hook for the time being. --fetch will hopefully be default in cordova 7 and you won't need the --fetch flag anymore |
Thanks! |
Looks like this issue just needs to be closed now. |
When using the before_plugin_install hook to install dependencies the Cordova-sqlite-storage plugin does not work with PhoneGap Build [1] or Intel XDK [2]. TBD I have not tried this with the old plugman tool yet. This is a catch-22 situation. I could declare a dependency on another plugin but this would not work with cordova-paramedic testing. A temporary solution would be to publish a special branch version with the sqlite3 dependencies manually included. I am hopeful that Apache CB-9858 will solve this problem. [1] storesafe/cordova-sqlite-storage#477 |
Yes, PGBUILD doesn't allow hooks for security reasons. You can test out fetch now with the |
I maintain several versions of the sqlite plugin and have been keeping them in sync by git merging. It is extremely time consuming to go through the merge-test stages over and over. It is especially time-consuming to keep the README.md documentation in reasonable sync.
It is possible to define sub-projects in git but I suspect the Cordova tooling would not follow such git sub-projects. I am also not convinced that this would be the best solution.
It would be possible to define a plugin to depend on other plugin(s), but I find this clumsy and error-prone and don't expect it to work with cordova-paramedic CI testing.
The solution I know of is to define a
before_plugin_install
hook script like they do in: https://github.com/AllJoyn-Cordova/cordova-plugin-alljoynIn comparison, Node.js/npm defines a way for modules to depend on each other which works great for Javascript but does not support nested dependencies for C/C++ addon code modules.
EXTRA NOTE ADDED: It would be possible to include certain external dependencies by adding dependenc(y)(ies) on other plugin project(s) but this would not be supported by the automatic cordova-paramedic CI testing that I am using.
The text was updated successfully, but these errors were encountered: