Apollo Site
Apollo静态站点生成工具,与Apollo-nico配套使用。
安装
-
安装 node
请自己安装 node。版本 >= 0.10.1 -
安装 apollo-site
$ npm install apollo-site -g
使用
apollo-site init
- 使用该命令前,务必已经使用apollo-nico生成组件的静态站点。参考:
apollo-nico build
apollo-nico build /a
- 该命令会在符合目录规范(6v/apollo)的路径下将apollo-nico生成的静态站点内容以json格式取出,存放在
apollo-site/template/module
下
生成文件说明:
- core.js:
core.html
页面所需的站点内容,由apollo/core
目录下的静态站点index.html
内容拼装。 - history.js:
history-state.html
页面所需的站点内容,由apollo/
目录下的history.html
内容拼装。 - state.js:
history-state.html
页面所需站点内容,数组格式,组件状态。 - widget.js:
widget.html
页面所需站点内容,由apollo/mod
目录下所有静态站点index.html
内容拼装。
apollo-site build
$ apollo-site build
- 该命令可全局使用。
- 将
template/module
下的数据文件和template/page
下的页面模板文件编译为静态html文件。并存放在在apollo-site/site
目录下。
apollo-site
$ apollo-site
-
该命令为
apollo-site
和apollo-build
命令的合体版,相当于:$ apollo-site init $ apollo-site build