已回复here
只需选择您缺少的内容即可完成。
(可能有一些错别字。)
需要终端。
假设的文件夹结构:
path/to/your/bull polished/project
|
`_ docs
|
`_ learn
|
`_ ui
注意
所有 3 个子文件夹 docs, learn, ui 可能被赋予不同的名称。
子文件夹 docs 和 ui必须是相邻文件夹。
目前learnsemantic.com (learn) 独立于其他 2 个存储库。所以它可以放在任何你喜欢的地方。
克隆存储库:
cd path/to/your/bull polished/project
文档:
git clone --recursive --progress -v "git@github.com:Semantic-Org/Semantic-UI-Docs.git" "docs"
Cloned https://github.com/Semantic-Org/Semantic-UI-Docs (http://semantic-ui.com/)
学习:
git clone --recursive --progress -v "git@github.com:Semantic-Org/Learn-Semantic.git" "learn"
Cloned https://github.com/Semantic-Org/Learn-Semantic (http://learnsemantic.com/)
用户界面:
git clone --recursive --progress -v "git@github.com:Semantic-Org/Semantic-UI.git" "ui"
Cloned https://github.com/Semantic-Org/Semantic-UI (The Semantic UI framework)
注意
如果您不想克隆所有 SUI 回购历史记录,请阅读:#220 (comment)
在全球和本地安装 Gulp。
npm install -g gulp
cd "path/to/your/bull polished/project/ui"
npm install gulp
安装语义 UI 框架。
(Still in : "path/to/your/bull polished/project/ui")
npm install
gulp
或者:
gulp install
全局和本地安装 Docpad。在本地安装 Docpad 插件。
全局安装:
npm install -g docpad
注意:全局更新docpad upgrade
然后本地安装到文档中:
cd "path/to/your/bull polished/project/docs"
npm install docpad
docpad install eco
然后本地安装到learn中:
cd "path/to/your/bull polished/project/learn"
npm install docpad
docpad install eco
注意:要在本地更新(docpad 和插件),请运行:docpad update 在 docs 和 learn 文件夹内。
注意
docpad 更新清除/删除 docs/out 文件夹(其中充满了 dist 和 src 文件夹,以及 gulp build-docs、gulp-serve-docs 和 docpad run 的文件)
因此,时机成熟时,在从ui 文件夹构建文档之前运行docpad update。
以 root/管理员身份运行 npm install docpad(以避免权限问题)。
绝对是在 Windows 上。
如果 Node 安装“不正确”,有时也会在 Linux/OS X 上。
但至少在 Linux/OS X 上,您可以重新安装 Node 来纠正这个问题。
见:node-forward/help#4
构建语义 UI 框架:
cd "path/to/your/bull polished/project/ui"
Only if required:
gulp clean
Followed by:
gulp build OR gulp watch
为 docs 文件夹中的文档构建语义 UI 框架:
cd "path/to/your/bull polished/project/ui"
gulp build-docs 或 gulp serve-docs
gulp build-docs : 创建和填充 docs/out/dist 和 docs/out/src
gulp serve-docs :监视 ui 文件夹中的源文件更改并更新文件夹 docs/out/dist 和 docs/out/src。
生成语义 UI 文档页面并启动本地服务器:
cd "path/to/your/bull polished/project/docs"
docpad run
docpad run : Creates all documentation files and folders (other than docs/out/dist and docs/out/src) in the docs/out folder.
生成 learnsemantic.com 页面并启动本地服务器:
cd "path/to/your/bull polished/project/learn"
docpad run
docpad run : Creates all documentation files and folders in the learn/out folder.
当您更改 SUI 框架变量等时
1) 对框架进行更改。
2) 重建框架:
gulp clean (only when necessary)
gulp build OR gulp watch
3) 更新文档:
gulp build-docs 或 gulp serve-docs
4) 生成文档页面。
docpad 运行或 docpad 服务器
回到 1)
如果您使用gulp watch 和gulp serve-docs,您应该是全自动的。