如何在本地主机上使用grunt、http-server运行bootstrap

How to run bootstrap in localhost using grunt, http-server

本文关键字:grunt http-server bootstrap 运行 主机      更新时间:2023-09-26

我是grunt, bower, yeoman, angularJS和http-server的新手。

我使用上面的工具创建了一个示例angularJS web应用程序,我在http-server上使用'grunt serve'运行它

现在我想创建一个启动项目与angularJS项目相同。所以我安装了

npm install -g generator-bootstrap

和我的项目文件夹

C:/workspace/bootstrap>yo bootstrap

我输入,它为我创建了像这样的引导组件

C:/workspace/bootstrap/bower_components/bootstrap 

在bootstrap文件夹中,所有组件和电源文件都存在。

现在我想使用grunt serve运行我的bootstrap项目,就像我在angularJS项目中做的那样。

但是我不能运行它。请帮助我,如果我错了,请指导。

yo bootstrap

如果你使用上面的命令,你的工作空间的内容将只有bower_components文件夹,这是Grunt serve不能工作的原因。

使用yo angular创建一个yeoman项目它会请求Do want to include bootstrap(y/n) :只要按下Y和u就可以了