无法在本地 运行 angular-material 文档

Unbale to run angular-material docs locally

我正在尝试 运行 Angular-Material 本地文档。我按照 link 中提到的说明进行操作 material/docs at master

Successfully executed npm install without errors (but with npm version warning - I'm just considering that thsi) after lots of googling and looking at SO answers.

当我执行 bower install 时,它会抛出以下错误。

G:\Angular\material-master\docs\app>bower install
bower                           ENOENT No bower.json present

当我用谷歌搜索时,我刚得到这个 link https://github.com/angular/material/issues/2407

we no longer use bower within the /angular/material repository. Now you use only need to use npm.

如果我继续gulp docs,我会再次收到如下错误:

G:\Angular\material-master\docs\app>gulp docs
[19:37:47] Working directory changed to G:\Angular\material-master\docs
[19:37:48] Using gulpfile G:\Angular\material-master\docs\gulpfile.js
[19:37:48] Task 'docs' is not in your gulpfile
[19:37:48] Please check the documentation for proper gulpfile formatting

我哪里出错了,我该如何让它工作?任何帮助表示赞赏。 PS:我不是使用节点或使用 angular 的专家。我也尝试了另外提到的 HTTPster 方法,但没有成功。

G:\Angular\material-master\docs\app>httpster -p 8080 -d ./dist/docs
Starting HTTPster v1.0.1 on port "8080" from ./dist/docs
GET / 404 10ms
GET /index 404 2ms
GET /demo 404 2ms
GET /help 404 1ms

并且随机希望从根目录尝试相同的操作,但得到了相同的结果。

我的问题与 Not able to run angular material docs on locally 表示不同的错误。

看起来你的安装没有完成。请按照步骤操作。

第 1 步:使用 git https://github.com/angular/material.git 获取主项目。或者在本地克隆它。
第 2 步:运行 npm 安装。
第 3 步:gulp 构建和 gulp 文档(如果没有,请先安装 gulp)。
第 4 步:gulp 服务器。 (此项目在 localhost:8080 处启动)。

有时它会导致 运行 问题,您也可以 运行 更进一步。

使用以下命令安装 http-server。
npm install http-server -g

然后 运行 使用
http-server dist/docs -p 8080 -a 127.0.0.1
项目在 http://localhost:8080/

可用