2015-08-13 35 views
1

我想在我的应用程序中使用引导主题Lumen。我已经安装了它的纯JS和CSS通过bowerBower + 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.cssbower_components/bootstrap.min.js/index.jsfont_face选项index.css需要../fonts/glyphicon-font-name.woff。所以,引导程序的所有字体应该放在bower_components/fonts

当然,我可以安装bootstrap凉亭包,然后运行grunt-copy后每隔bower install,但这种方法似乎是错误的。我如何在我的./index.html右边做这个字体要求?

+0

复制像图像和字体的依赖关系是'咕噜-copy'的唯一途径。你可以添加一个postinstall挂钩到bower来复制字体。 –

+0

@AhmadAlfy你是说每个人都是通过bower安装bootstrap复制粘贴它的字体文件的?这似乎很奇怪。我觉得应该有一个干净的方式 – asiniy

回答

1

您可以安装凉亭包bootswatch-dist - 靴子主题的分发包。
有关安装的3.3.5版本腔内添加下面的依赖关系bower.json

"dependencies": { 
"bootswatch-dist": "3.3.5-lumen" 
} 
+1

酷解决方案。谢谢! – asiniy