Giter Site home page Giter Site logo

Comments (9)

stevengill avatar stevengill commented on June 1, 2024 1

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

from cordova-discuss.

brodybits avatar brodybits commented on June 1, 2024

FYI I have a version of the sqlite plugin using npm in a before_plugin_install hook script to fetch its bigger sqlite library dependencies: https://github.com/brodybits/Cordova-sqlite-storage-common-dev

It is now working for Android, iOS, and Windows platforms. I am able to declare the external dependency in package.json and let the hook script just do npm install (within the correct directory).

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 before_plugin_install hook working to add external dependencies.

I am very happy to have found a solution that lets me declare an external dependency in package.json and let npm fetch it for me. I would love to see a similar solution integrated with Cordova someday.

from cordova-discuss.

stevengill avatar stevengill commented on June 1, 2024

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 npm cache add and that does not fetch deps.

from cordova-discuss.

brodybits avatar brodybits commented on June 1, 2024

@stevengill I will give your --fetch work a try when I get a chance. I am closing this in favor of the fetching proposal in #33.

from cordova-discuss.

brodybits avatar brodybits commented on June 1, 2024

For the sqlite plugin I would rather not depend on the user adding a "--fetch" flag as discussed in #33 / Apache CB-9858.

from cordova-discuss.

brodybits avatar brodybits commented on June 1, 2024

Thanks!

from cordova-discuss.

nikhilkh avatar nikhilkh commented on June 1, 2024

Looks like this issue just needs to be closed now.

from cordova-discuss.

brodybits avatar brodybits commented on June 1, 2024

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
[2] storesafe/cordova-sqlite-storage#489

from cordova-discuss.

stevengill avatar stevengill commented on June 1, 2024

Yes, PGBUILD doesn't allow hooks for security reasons.

You can test out fetch now with the --fetch flag with cordova 6.2.0, but PGBUILD probably won't start using fetch until it becomes the default (cordova 7)

from cordova-discuss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.