【发布时间】:2023-03-15 03:10:02
【问题描述】:
我想在我的应用程序中使用引导主题 Lumen。我已经通过bower 安装了它的纯 js 和 css:
/* part of bower.json */
{
"bootstrap.min.css": "https://bootswatch.com/lumen/bootstrap.min.css",
"bootstrap.min.js": "https://bootswatch.com/lumen/bootstrap.min.css"
}
因此,bower_components/bootstrap.min.css/index.css 和 bower_components/bootstrap.min.js/index.js 中安装了两个文件。 index.css 的font_face 选项需要../fonts/glyphicon-font-name.woff。所以,引导程序的所有字体都应该放在bower_components/fonts!
当然,我可以安装bootstrap bower 包,然后在每个bower install 之后运行grunt-copy,但是这种方法似乎是错误的。如何在我的./index.html 上执行此字体要求对吗?
【问题讨论】:
-
复制图像和字体等依赖项的唯一方法是
grunt-copy。您可以向 bower 添加一个安装后挂钩以复制字体。 -
@AhmadAlfy 你的意思是每个通过凉亭复制粘贴字体文件安装引导程序的人吗?这似乎很奇怪。我认为应该有一个干净的方式
标签: twitter-bootstrap fonts gruntjs bower