安装
依赖:node,gulp/grunt;
npm install devbridge-styleguide --save-dev
npm install devbridge-styleguide -g
npm install -g live-server
npm install gulp
npm install gulp-sass
kams的styleguide在这里:
git clone https://github.com/cobantou/kams-styleguide
使用
Styleguide有两种模式:
1.“view”:仅仅是查看功能;

2.“edit”:除了查看,还有在线编辑功能;

view
在命令行中输入:
live-server
只要起了live-server服务器就可以了,但要保证命令行当前目录为Styleguide的目录。
edit
在命令行中输入:
live-server;
再开一个命令行,输入:
gulp start-styleguide
确保编写了正确的gulpfile配置。
界面使用

最后
东西比较简单,不赘述了。附上几个文档地址:
1.styleguide: http://livingstyleguide.devbridge.com/;
2.styleguide github:https://github.com/devbridge/Styleguide;‘
3.live server:https://www.npmjs.com/package/live-server; ’
网友评论