Meteor 1.0.3.1 + bower - 除了 bootstrap 之外没有加载任何东西?
Meteor 1.0.3.1 + bower - not loading anything but bootstrap?
我已经在 meteor-bower 的 github 问题板上发布了这个问题,但我认为你们可能已经找到了答案。
我正在努力使 Bower 与 Meteor 1.0.3.1 兼容。
mquandalle:bower
软件包已安装。
我的bower.json在项目根目录:
{
"name": "xx",
"version": "0.1.0",
"dependencies": {
"modernizr": "2.8.3",
"bootstrap": "3.3.2",
"fancybox": "2.1.5"
},
"private": true,
"homepage": "xx",
"authors": [
"Lee Benson <lee@leebenson.com>"
],
"description": "Whatever",
"moduleType": [
"node"
],
"license": "NA",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
".meteor/local/bower",
"test",
"tests"
]
}
加上.bowerrc:
{
"directory" : ".meteor/local/bower"
}
然而页面转储的视图源仅显示(在非 bower 内容中):
<script type="text/javascript" src="/packages/mquandalle_bower.js?6f5e05d255022e01686a1080478129b4d5ce7df2"></script>
<script type="text/javascript" src="/packages/bower/bootstrap/dist/js/bootstrap.js?f8752e9ae24daec0a0baffd7819122f8c6fd9103"></script>
知道 fancybox 和 modernizr 发生了什么事吗?
您为什么不使用 "manual" 方法来为您的凉亭元素执行这些简单且完全可控的步骤?
- cd 进入你的 meteor 根目录
- bower init(在控制台提示中填写所需信息)
- 触摸.bowerrc
- 使用您喜欢的编辑器编辑 .bowerrc 并指定(作为示例):
{ "directory" : "public/bower_components" }
添加您的包裹:
bower 安装 --save bootstrap
bower 安装 --save modernizr
bower 安装 --save fancybox
将需要的 css / js link 添加到您的 head
部分
- 稍后更新您的 Bower 组件只需输入:bower update
也许这会有所帮助,请尝试将您需要的文件放在 main
下:
issue #50 or adding an overrides
section to your app's bower.json
: issue #54
by default meteor-bower automatically includes only the files listed in the main
section of package's bower.json file. The other files will still
present in their corresponding folder but not referenced anywhere in
your app. (checkout the spec)
If you have a package without a main section, you should manually
reference the files you need.
我已经在 meteor-bower 的 github 问题板上发布了这个问题,但我认为你们可能已经找到了答案。
我正在努力使 Bower 与 Meteor 1.0.3.1 兼容。
mquandalle:bower
软件包已安装。
我的bower.json在项目根目录:
{
"name": "xx",
"version": "0.1.0",
"dependencies": {
"modernizr": "2.8.3",
"bootstrap": "3.3.2",
"fancybox": "2.1.5"
},
"private": true,
"homepage": "xx",
"authors": [
"Lee Benson <lee@leebenson.com>"
],
"description": "Whatever",
"moduleType": [
"node"
],
"license": "NA",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
".meteor/local/bower",
"test",
"tests"
]
}
加上.bowerrc:
{
"directory" : ".meteor/local/bower"
}
然而页面转储的视图源仅显示(在非 bower 内容中):
<script type="text/javascript" src="/packages/mquandalle_bower.js?6f5e05d255022e01686a1080478129b4d5ce7df2"></script>
<script type="text/javascript" src="/packages/bower/bootstrap/dist/js/bootstrap.js?f8752e9ae24daec0a0baffd7819122f8c6fd9103"></script>
知道 fancybox 和 modernizr 发生了什么事吗?
您为什么不使用 "manual" 方法来为您的凉亭元素执行这些简单且完全可控的步骤?
- cd 进入你的 meteor 根目录
- bower init(在控制台提示中填写所需信息)
- 触摸.bowerrc
- 使用您喜欢的编辑器编辑 .bowerrc 并指定(作为示例):
{ "directory" : "public/bower_components" }
添加您的包裹:
bower 安装 --save bootstrap
bower 安装 --save modernizr
bower 安装 --save fancybox
将需要的 css / js link 添加到您的
head
部分- 稍后更新您的 Bower 组件只需输入:bower update
也许这会有所帮助,请尝试将您需要的文件放在 main
下:
issue #50 or adding an overrides
section to your app's bower.json
: issue #54
by default meteor-bower automatically includes only the files listed in the main section of package's bower.json file. The other files will still present in their corresponding folder but not referenced anywhere in your app. (checkout the spec)
If you have a package without a main section, you should manually reference the files you need.