如何在 meteor 下安装 bower 包?

How to install an bower package under meteor?

我正在尝试安装这个 https://github.com/mdehoog/Semantic-UI-Calendar 包。我从我的项目文件夹中安装了 npm install -g bower 这个浏览器包管理器。然后我从我的项目文件夹中用 bower install --save semantic-ui-calendar 安装了这个日历包。

启动我的应用程序后,我收到以下错误消息:

While processing files with less (for target web.browser):

bower_components/semantic-ui-calendar/src/definitions/modules/calendar.less:18: Unknown import: ../../theme.config

bower_components/semantic-ui-calendar/src/theme.less:3:8: variable @themesFolder is undefined

我应该包括在哪里

<script type="text/javascript" src="/bower_components/semantic-ui-calendar/dist/calendar.min.js"></script>
<link rel="stylesheet" href="/bower_components/semantic-ui-calendar/dist/calendar.min.css" />

@import 'definitions/modules/calendar';

  lessOptions: {
    paths: [
      'bower_components/semantic-ui-calendar/src',
      ...
    ]
  }

来自安装指南?这个日历包可以与 meteor 1.4 一起使用吗?

不推荐使用 Bower 包。因为 Meteor 允许直接使用 npm 包,你想要的 bower 包应该有一个 npm 等价物,因此可以用 npm install 安装...

有一个软件包 https://atmospherejs.com/mquandalle/bower 允许安装 bower 模块,但您也应该避免这样做。