包括Aurelia中的bootstrap css [英] Including bootstrap css in Aurelia

查看:54
本文介绍了包括Aurelia中的bootstrap css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是奥雷利亚(Aurelia)的新手,但遇到第一关. 我使用aurelia cli创建了一个新项目,并选择了减少使用.

I am new to Aurelia and falling at the first hurdle. I have created a new project using the aurelia cli and have selected to use less.

这很好,直到我尝试使用引导程序.我已使用出现在node_modules/bootstrap/

This works fine until I try to use bootstrap. I have installed bootstrap with npm which appears in node_modules/bootstrap/

这具有目录结构

dist字体发出咕Gr声Gruntfile.js js少了LICENSE package.json README.md

dist fonts grunt Gruntfile.js js less LICENSE package.json README.md

dist目录中有css文件.

There are css files in the dist directory.

我在模板中做

我得到的错误是 未处理的拒绝错误:无法加载所需的CSS文件:bootstrap/css/bootstrap.css

The error I get is Unhandled rejection Error: Failed loading required CSS file: bootstrap/css/bootstrap.css

我如何告诉Aurelia引导css文件在哪里以及如何使用它们?

How do I tell Aurelia where the bootstrap css files are and how to use them ?

谢谢

推荐答案

我们仍在使用CLI的能力,以将库导入项目并正确配置它们以进行捆绑.请记住,它是一个Alpha.将来,我们将对此进行重大改进.同时,请记住,如果不确定要做什么,可以始终使用传统技术来包括库.因此,我只需在您的html页面中包含样式标签,并在脚本标签中也包含一个脚本标签,只需指向您的packages文件夹中文件的位置即可.

We are still working on the CLI's ability to import libraries into a project and configure them correctly for bundling. Remember, it is an alpha. We will have major improvements coming for this in the future. In the mean time, remember that you can always use traditional techniques for including libraries if you aren't sure what to do. So, I would just include the style tag in your html page and a script tag as well, just pointing at the location for the files in your packages folder.

这对我们来说是一个主要用例,我们还没有确定所有的库导入功能.我们将尽快解决.

This is a major use case for us, we just haven't worked out all the library import capabilities yet. We will address this soon.

这篇关于包括Aurelia中的bootstrap css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆