【问题标题】:Installing meteor package,local or github安装流星包,本地或 github
【发布时间】:2016-05-16 23:21:33
【问题描述】:

我在使用这个用于 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 克隆包含修复程序的 repo https://github.com/stefanve/meteor-autoform-bs-datetimepicker.git

我正在按照此帖子说明 How to modify already installed Atmosphere packages 了解如何在本地安装软件包。

我尝试在包目录下安装包,但收到包未知的错误。

我尝试将包文件编辑为此

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');
});

我的包已经安装好了。

M 的问题是,meteor 是从我克隆的文件中安装包还是从 github 获得的?。

【问题讨论】:

    标签: meteor


    【解决方案1】:

    Meteor 不会从 github 安装包。它根本做不到。

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

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

    【讨论】:

    • 好主意。我会换版本看看。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-18
    • 1970-01-01
    • 2016-01-21
    • 1970-01-01
    • 2015-01-26
    • 2020-05-02
    相关资源
    最近更新 更多