How to add a cordova plugin to meteor that isn't in the phonegap registry?

后端 未结 3 1736
遥遥无期
遥遥无期 2021-02-08 20:24

According to the documentation you can add a project from the registry or from a tarball url?

# add plugin from plugin registry
meteor add cordova:org.apache.cor         


        
3条回答
  •  隐瞒了意图╮
    2021-02-08 20:53

    You can no longer add a Cordova plugin with a tarball URL (I'm using Meteor 1.2.0.1) and there seems to be some sort of bug using the hash value as the docs recommend. Here's what I did instead:

    First, I cloned the git project under myapp/private folder. It's important it's private otherwise Meteor will pick-up the www/*.js files and try to compile like normal causing other issues (e.g., "module" or "require" is not defined).

    Second, use the following command to add them to your project:

    meteor add cordova:com.loutilities.qaps.mobile.plugin.phone@file://./private/plugins/cordova-plugin-phone
    

    This will them to the cordova-plugins directory along with the other bits they add.

提交回复
热议问题