使用github tarball链接将Cordova插件安装到流星项目 [英] Installing Cordova plugin to meteor project using a github tarball link

查看:70
本文介绍了使用github tarball链接将Cordova插件安装到流星项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用github中的存储库将包安装到流星项目中.
流星允许我安装的唯一方法是使用"tarball" 特定链接,如下所示: https://github.com/Wizcorp/phonegap-facebook-plugin/tarball/d8b0f6935a7c6e586

I'm trying to install a package to my meteor project using a repository in github.
The only way Meteor allow me to install it is using a "tarball" specific link like this: https://github.com/Wizcorp/phonegap-facebook-plugin/tarball/d8b0f6935a7c6e586188bf85f9da88a1c160790b

尽管,链接中引用的软件包版本不是我所需要的(我从旧的支持文章获得了该链接).

Although, the package version referenced in the link is not the one I need (I got that link from an old support post).

有人可以解释一下我如何从此存储库和版本(0.12.0)中获得这种类型的链接(tarball)吗? https://github.com/Wizcorp/phonegap-facebook-plugin/releases/tag/v0.12.0

Could someone explain me how to obtain that type of link (tarball) from this repository and version (0.12.0)? https://github.com/Wizcorp/phonegap-facebook-plugin/releases/tag/v0.12.0

到目前为止,我已经尝试过:

So far I have tried:

  1. 复制正确版本的tar.gz下载链接并运行:流星添加cordova:com.phonegap.plugins.facebookconnect@https://github.com/aogilvie/phonegap-facebook-plugin/archive/0.6.0.tar.gz

结果:流星需要一个确切的版本,一个带有SHA的Git URL参考"

Result: "Meteor requires either an exact version, a Git URL with a SHA reference"

  • 使用版本号安装它:流星添加cordova:com.phonegap.plugins.facebookconnect@0.12.0

    结果:我安装了软件包",但是当运行ios-device 时,我得到了错误消息:无法通过注册表获取插件com.phonegap.plugins.facebookconnect@0.12.0".

    Result: I got "Package installed" but when run ios-device I got the error: "Failed to fetch plugin com.phonegap.plugins.facebookconnect@0.12.0 via registry".

  • 下载zip文件,解压缩并将文件夹放在packages文件夹中.

  • Downloading the zip file, unzip and put folder in packages folder.

    结果:由于文件夹内没有package.js,因此无法正常工作.

    Result: Is not working because is not a package.js inside the folder.

  • 预先感谢

    推荐答案

    您实际上是在尝试添加Cordova插件( meteor add cordova:... ),而不是添加Meteor软件包.

    You are actually trying to add a Cordova plugin (meteor add cordova:...), not a Meteor package.

    因此,您的试用3(本地软件包/插件)需要类似的流星添加cordova:your-plugin-name @ file://packages/folder-to-local-cordova-plugin 流星添加程序包名称(它将查找 package.js 文件).

    Therefore, your trial 3 (local package / plugin) needs a similar meteor add cordova:your-plugin-name@file://packages/folder-to-local-cordova-plugin instead of a meteor add package-name (which will look for a package.js file).

    试用2(版本号)仅适用于已发布的插件.

    Trial 2 (version number) works only for published plugins.

    您应该坚持使用试验1,但必须指定提交哈希(git端点+ # +提交哈希)而不是tarball链接:

    You should stick with your trial 1 but you have to specify the commit hash (git endpoint + # + commit hash) instead of the tarball link:

    meteor add cordova:com.phonegap.plugins.facebookconnect@https://github.com/Wizcorp/phonegap-facebook-plugin.git#c0f8da97a1d65397ada73e958dafed3aeef2e491
    

    请参见流星指南>构建>移动>带有Cordova插件的本机功能>安装插件>从Git安装插件

    See Meteor Guide > Build > Mobile > Native features with Cordova plugins > Installing plugins > Installing a plugin from Git

    这篇关于使用github tarball链接将Cordova插件安装到流星项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆