我想在我的应用程序中使用引导主题Lumen。我已经安装了它的纯JS和CSS通过bower
:Bower + bootstrap主题 - 如何包含字体?
/* 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
。 font_face
选项index.css
需要../fonts/glyphicon-font-name.woff
。所以,引导程序的所有字体应该放在bower_components/fonts
!
当然,我可以安装bootstrap
凉亭包,然后运行grunt-copy
后每隔bower install
,但这种方法似乎是错误的。我如何在我的./index.html
右边做这个字体要求?
复制像图像和字体的依赖关系是'咕噜-copy'的唯一途径。你可以添加一个postinstall挂钩到bower来复制字体。 –
@AhmadAlfy你是说每个人都是通过bower安装bootstrap复制粘贴它的字体文件的?这似乎很奇怪。我觉得应该有一个干净的方式 – asiniy