问题描述
我正在尝试使用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:
-
复制正确版本的tar.gz下载链接并运行:
流星添加cordova:com.phonegap.plugins.facebookconnect@https://github.com/aogilvie/phonegap-facebook-plugin/archive/0.6.0.tar.gz
使用版本号安装它:流星添加cordova:[email protected]
下载zip文件,解压缩并将文件夹放在packages文件夹中.
Downloading the zip file, unzip and put folder in packages 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插件安装到流星项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!