在本地安装Material Design Lite的文档时遇到一些问题。我在this file中执行了以下命令
git clone https://github.com/google/material-design-lite
cd material-design-lite
npm install && npm install -g gulp
gulp all && gulp serve运行gulp all时出现错误:
root@c54a089ac69c:/home/material-design-lite# gulp all
[21:18:38] Requiring external module babel-register
[21:18:42] Using gulpfile /home/material-design-lite/gulpfile.babel.js
[21:18:42] Starting 'clean'...
[21:18:42] Finished 'clean' after 106 ms
[21:18:42] Starting 'all'...
[21:18:42] Starting 'lint:aux'...
[21:18:45]
/home/material-design-lite/gulpfile.babel.js
136:1 warning Unexpected 'todo' comment no-warning-comments
807:3 warning Unexpected 'todo' comment no-warning-comments
✖ 2 problems (0 errors, 2 warnings)
[21:18:45] Finished 'lint:aux' after 2.39 s
[21:18:45] Starting 'styletemplates'...
[21:18:49] styles all files 1.07 MB
[21:18:49] Finished 'styletemplates' after 4.04 s
[21:18:49] Starting 'styles-grid'...
[21:18:49] Starting 'styles'...
[21:18:49] styles-grid all files 17.77 kB
[21:18:49] Finished 'styles-grid' after 187 ms
[21:18:50] styles all files 714.08 kB
[21:18:50] Finished 'styles' after 1.39 s
[21:18:50] Starting 'styles:gen'...
[21:18:52] Finished 'styles:gen' after 2.36 s
[21:18:52] Starting 'lint:sources'...
[21:18:56]
/home/material-design-lite/src/mdlComponentHandler.js
232:49 error Properties shouldn't be quoted as all quotes are redundant quote-props
366:51 error Properties shouldn't be quoted as all quotes are redundant quote-props
/home/material-design-lite/src/checkbox/checkbox.js
123:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/icon-toggle/icon-toggle.js
119:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/radio/radio.js
133:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/switch/switch.js
122:5 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/tabs/tabs.js
88:7 warning Do not use 'new' for side effects no-new
/home/material-design-lite/src/textfield/textfield.js
273:11 warning Unexpected 'todo' comment no-warning-comments
/home/material-design-lite/src/layout/layout.js
520:11 warning Do not use 'new' for side effects no-new
570:3 error Block must not be padded by blank lines padded-blocks
✖ 10 problems (3 errors, 7 warnings)
[21:18:56] 'lint:sources' errored after 3.59 s
[21:18:56] ESLintError in plugin 'gulp-eslint'
Message:
Failed with 3 errors
[21:18:56] 'all' errored after 14 s
[21:18:56] Error in plugin 'run-sequence'
Message:
An error occured in task 'lint:sources'.但是,当我用gulp serve提供它时,它正在运行,但只显示了以下内容:

它只是在显示文件!如何为material-design-lite生成离线文档?有什么想法吗?谢谢。
谢谢你;
PS:
我用NodeJS Container.在Docker上运行这个程序
材料设计精简版网站:https://getmdl.io
发布于 2018-04-07 02:44:49
我从来没有尝试过克隆存储库,但通过这种方式,我可以获得离线文档。只使用wget工具。wget -mkEpnp https://getmdl.io和瞧,你的桌面上有网站的副本。
发布于 2016-12-23 02:17:53
正如参考here的GitHub问题中所提到的
您需要使用Unix样式的行尾结帐。README__中详细介绍了此过程。
Windows用户,如果由于行结束而出现编译问题,请确保将git配置为使用lf (unix) line endings__签出存储库。这可以通过设置core.eol__来实现。
git config core.eol lf
git config core.autocrlf input
git rm --cached -r .
git reset --hard另一个错误
error Properties shouldn't be quoted as all quotes are redundant quote-props已修复问题here中提到的高于mdl-1.1的版本
希望它能帮上忙!干杯!
https://stackoverflow.com/questions/36657075
复制相似问题