如何使用 g运行t, http-server 在本地主机中 运行 bootstrap

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

我是 g运行t、bower、yeoman、angularJS 和 http-server 的新手。

我使用上述工具创建了一个示例 angularJS 网络应用程序,我 运行 使用 'grunt serve'

在 http 服务器上安装它

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

npm install -g generator-bootstrap

在我的项目文件夹中

C:/workspace/bootstrap>yo bootstrap

我打字,它为我创建了 bootstrap 这样的组件

C:/workspace/bootstrap/bower_components/bootstrap 

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

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

但我不能运行。请帮助我,如果我有任何错误,请指导。

yo bootstrap

如果您使用上述命令,您工作区的内容将只有 bower_components 个文件夹,这就是 Grunt serve 不起作用的原因。

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