安装meteor包,本地或github

时间:2016-05-16 15:12:21

标签: meteor

我遇到了针对autoform https://github.com/aldeed/meteor-autoform-bs-datetimepicker的此datepicker程序包的问题,​​修复程序位于另一个repo https://github.com/stefanve/meteor-autoform-bs-datetimepicker中并提前两次提交https://github.com/aldeed/meteor-autoform-bs-datetimepicker/compare/master...stefanve:master

我去了我的包文件夹,这是空的,我git克隆了包含修复程序的仓库https://github.com/stefanve/meteor-autoform-bs-datetimepicker.git

我正在关注如何在本地安装软件包的帖子说明How to modify already installed Atmosphere packages

我尝试在包dir上安装软件包,但是收到包裹未知的错误。

我尝试将包文件编辑到此

Package.describe({
    name: 'stefanve:autoform-bs-datetimepicker',
    summary: 'Custom bootstrap-datetimepicker input type with timezone support for AutoForm',
    version: '1.0.6',
    git: 'https://github.com/stefanve/meteor-autoform-bs-datetimepicker.git'
});

Package.onUse(function(api) {
  api.use('templating@1.0.0');
  api.use('blaze@2.0.0');
  api.use('aldeed:autoform@4.0.0 || 5.0.0');

  // Ensure momentjs packages load before this one if used
  api.use('momentjs:moment@2.8.4', 'client', {weak: true});
  api.use('mrt:moment-timezone@0.2.1', 'client', {weak: true});

  api.addFiles([
    'autoform-bs-datetimepicker.html',
    'autoform-bs-datetimepicker.js'
  ], 'client');
});

我的包已安装。

问题是,meteor是从我克隆的文件安装了packae还是从github获得的?

1 个答案:

答案 0 :(得分:0)

Meteor没有从github安装软件包。它根本无法做到。

包列表在.meteor/packages文件中。如果您的本地packages文件夹中有匹配的名称,那么它将从那里加载,否则从Atmosphere加载(本地优先于Atmosphere)。

尝试更改package.js中的version,看看它如何重新加载您的包并更新.meteor/versions