* [doc] Change the guide directory structure: Add a new type 'tools'.

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/9dd6bdd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9dd6bdd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9dd6bdd4

Branch: refs/heads/master
Commit: 9dd6bdd42130d12a7e9f3201d38c079914175381
Parents: 6dc87a7
Author: Yun Dong <[email protected]>
Authored: Mon Mar 6 15:47:27 2017 +0800
Committer: Yun Dong <[email protected]>
Committed: Mon Mar 6 15:47:27 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/guide/dev-with-weexpack.md        |  11 -
 doc/source/cn/guide/index.md                    | 114 ------
 doc/source/cn/guide/intro/app-architecture.md   |   2 +-
 doc/source/cn/guide/intro/devtools.md           |  99 -----
 doc/source/cn/guide/intro/how-it-works.md       |   2 +-
 doc/source/cn/guide/intro/index.md              |   2 +-
 doc/source/cn/guide/intro/page-architecture.md  |   2 +-
 doc/source/cn/guide/intro/using-vue.md          |   2 +-
 doc/source/cn/guide/intro/web-dev-experience.md |   2 +-
 doc/source/cn/guide/intro/write-once.md         |   2 +-
 doc/source/cn/guide/set-up-env.md               | 126 ++++++
 doc/source/cn/guide/tools/devtools.md           | 111 ++++++
 doc/source/cn/guide/tools/index.md              |  11 +
 doc/source/cn/guide/tools/weexpack.md           | 388 +++++++++++++++++++
 doc/source/cn/references/common-style.md        |  11 +-
 doc/source/cn/references/components/scroller.md |   8 +-
 doc/source/guide/dev-with-weexpack.md           |  12 -
 doc/source/guide/index.md                       |  52 ---
 doc/source/guide/intro/app-architecture.md      |   2 +-
 doc/source/guide/intro/devtools.md              |   2 +-
 doc/source/guide/intro/how-it-works.md          |   2 +-
 doc/source/guide/intro/index.md                 |   2 +-
 doc/source/guide/intro/page-architecture.md     |   2 +-
 doc/source/guide/intro/using-vue.md             |   2 +-
 doc/source/guide/intro/web-dev-experience.md    |   2 +-
 doc/source/guide/intro/write-once.md            |   2 +-
 doc/source/guide/set-up-env.md                  |  93 +++++
 doc/source/guide/tools/devtools.md              | 100 +++++
 doc/source/guide/tools/index.md                 |  11 +
 doc/source/guide/tools/weexpack.md              | 298 ++++++++++++++
 30 files changed, 1163 insertions(+), 312 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/dev-with-weexpack.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/dev-with-weexpack.md 
b/doc/source/cn/guide/dev-with-weexpack.md
deleted file mode 100644
index 2f39204..0000000
--- a/doc/source/cn/guide/dev-with-weexpack.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: 构建全新应用
-type: guide
-order: 2
-version: 2.1
-has_chapter_content: true
----
-
-# 构建全新应用
-
-Work in process.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/index.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/index.md b/doc/source/cn/guide/index.md
index e2d43e4..22670ed 100644
--- a/doc/source/cn/guide/index.md
+++ b/doc/source/cn/guide/index.md
@@ -54,117 +54,3 @@ Vue.js 是 Evan You 开发的渐进式 JavaScript 
框架。开发者能够通过
 ```
 
 我们暂时不去关心 Weex 的技术细节,仅看大致的代ç 
ç»“构,我们可以看到语法就是我们熟悉的 Vue。你
可以修改这个例子,再次扫码尝试。
-
-## 搭建开发环境
-
-使用 dotWe 对 Weex 尝鲜是一个不错的选择,但如果你
想更专业的开发 Weex, dotWe 就不怎么够用了。本节会教你
如何搭建本地开发环境进行 Weex 开发。
-
-### 第一步:安装依赖
-
-Weex 官方提供了 weex-toolkit 的脚手架工具来辅
助开发和调试。首先,你需要 Node.js 和 weex-toolkit。
-
-安装 Node.js 方式多种多样,最简单的方式是在 [Node.js 
官网](https://nodejs.org/en/) 下载可执行程序直接安装即可。
-
-对于 Mac,可以使用 [Homebrew](http://brew.sh/) 进行安装:
-
-```bash
-brew install node
-```
-
-> 更多安装方式可参考 [Node.js 
官方信息](https://nodejs.org/en/download/)
-
-安装完成后,可以使用以下命令检测是否安装成功:
-
-```bash
-$ node -v
-v6.3.1
-$ npm -v
-3.10.3
-```
-
-通常,安装了 Node.js 环境,npm 包管理工具也随之安装了。因
此,直接使用 npm 来安装 weex-toolkit。
-
-> npm 是一个 JavaScript 包管理工具,它可以让开发者轻松å…
±äº«å’Œé‡ç”¨ä»£ç ã€‚Weex 很多依赖来自社区,同样,Weex 
也将很多工具发布到社区方便开发者使用。
-
-**注意: ** weex-toolkit 目前仅有最新的 beta 
版本开始才支持初始化 Vue 
项目,使用前请确认版本是否正确。
-
-```bash
-$ npm install -g weex-toolkit@beta
-```      
-
-国内开发者可以考虑使用淘宝的 npm 镜像 —— 
[cnpm](https://npm.taobao.org/) 安装 weex-toolkit
-
-```bash
-$ npm install -g cnpm
-$ cnpm install -g weex-toolkit@beta
-```
-
-*提示:*
-
-如果提示权限错误(*permission error*),使用 `sudo` å…
³é”®å­—进行安装
-
-```bash
-$ sudo cnpm install -g weex-toolkit@beta
-```
-
-安装结束后你可以直接使用 `weex` 命令验证是否安装
成功,它会显示 `weex` 命令行工具各参数:
-
-![](https://img.alicdn.com/tps/TB1kHFrOFXXXXaYXXXXXXXXXXXX-615-308.jpg)
-
-### 第二步:初始化
-
-然后初始化 Weex 项目:
-
-```bash
-$ weex init awesome-project
-```
-
-执行完命令后,在 `awesome-project` 目录中就创建了一个使用 
Weex 和 Vue 的模板项目。
-
-### 第三步:开发
-
-之后我们进入项目所在路径,weex-toolkit 已经为我们生成了æ 
‡å‡†é¡¹ç›®ç»“构。
-
-在 `package.json` 中,已经配置好了几个常用的 npm 
script,分别是:
-
-- `build`: 源码打包,生成 JS Bundle
-- `dev`: webpack watch 模式,方便开发
-- `serve`: 开启静态服务器
-- `debug`: 调试模式
-
-我们先通过 `npm install` 安装项目依赖。之后运行 `npm run dev` 
和 `npm run serve` 开启watch 模式和静态服务器。
-
-然后我们打开浏览器,进入 `http://localhost:8080/index.html` 
即可看到 weex h5 页面。 
-
-初始化时已经为我们创建了基本的示例,我们可以在 
`src/foo.vue` 中查看。
-
-代码如下所示:
-
-```html
-<template>
-  <div class="wrapper">
-    <text class="weex">Hello Weex !</text>
-    <text class="vue">Hello Vue !</text>
-  </div>
-</template>
-
-<style scoped>
-  .wrapper {
-    flex-direction: column;
-    justify-content: center;
-  }
-  .weex {
-   font-size: 60px;
-   text-align: center;
-   color: #1B90F7;
-  }
-  .vue {
-   font-size: 60px;
-   text-align: center;
-   margin-top: 30px;
-   color: #41B883;
-  }
-</style>
-```
-
-关于 Weex 语法部分,你可以直接参考 [Vue 
Guide](https://vuejs.org/v2/guide/),这里不再重复介绍。如果您想了解有å
…³æŠ€æœ¯è¯¦æƒ…的更多信息,请继续阅
读下一节。并且不要忘记在 dotWe 写代码并随时预览。
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/app-architecture.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/app-architecture.md 
b/doc/source/cn/guide/intro/app-architecture.md
index a3f39ce..22fc35c 100644
--- a/doc/source/cn/guide/intro/app-architecture.md
+++ b/doc/source/cn/guide/intro/app-architecture.md
@@ -1,7 +1,7 @@
 ---
 title: 用 Weex 构建移动应用
 type: guide
-order: 4.5
+order: 5.5
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/devtools.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/devtools.md 
b/doc/source/cn/guide/intro/devtools.md
deleted file mode 100644
index 4935e13..0000000
--- a/doc/source/cn/guide/intro/devtools.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-title: 使用 Devtools
-type: guide
-order: 4.7
-version: 2.1
----
-
-# Devtools
-
-**weex devtools**是专门为weex定制的一款实现了[**Chrome Debugging 
Protocol**](https://developer.chrome.com/devtools/docs/debugger-protocol)的inspect/debugå·¥å
…·ï¼Œèƒ½å¤Ÿå¸®åЩ你
快速查看app运行状态和调试weex中的Javascript代ç 
ï¼Œå½“前支持**IOS**和**Android**两个平台。
-## 安装
-
-```
-$ npm install  -g  weex-toolkit
-```
-
-## 用法
-
- weex debug [options] [we_file|bundles_dir]
-
-  选项:
-
-```
--h, --help           显示帮助
--V, --verbose        显示debug服务器运行时的各种log
--v, --version        显示版本
--p, --port [port]    设置debug服务器端口号 默认为8088
--e, --entry [entry]  debug一个目录时,这个参数指定整个目录的å…
¥å£bundle文件,这个bundle文件的地址会显示在debug主页上(作为二维ç
 )
--m, --mode [mode]    设置构建we文件的方式,transformer 
最基础的风格适合单文件,loader:wepack风格 
适合模块化的多文件.默认为transformer
-```
-#### 开启调试
-
-```
-$weex debug
-```
-
-单纯启动一个调试服务器,并同时唤起chrome浏览器打开`调试主页`.
-这个`调试主页`上会有一个二维码,使用Playground 
App扫这个二维码可以开启Playground调试.
-开启调试后,设备列表中会出现您的设备,æ 
¹æ®æç¤ºè¿›è¡ŒåŽç»­çš„调试操作
-#### 调试 we文件
-
-```
-$weex debug your_weex.we
-```
-
-这个命令会将your_weex.we编译成bundlejs文件 部署到debug服务器
-并启动debug服务器如上述命令那æ 
·.打开的`调试主页`会多显示一个二维码,使用playground app
-扫这个码可以加载your_weex.we.(注意要先扫描开启调试的那个ç 
)
-这个命令会自动检测your_weex.we文件变动,如果发现内
容被修改则立即重新编译部署,并刷新debugger页面
-.
-#### 调试整个bundle/we文件夹
-
-```
-$weex debug your/we/path  -e index.we
-```
-
-这个命令会编译你
指定目录下的所有的we文件,并把编译好的bundlejs部署到debug服务器,他们的地址会æ˜
 å°„到 http://lcoalhost:8088/weex/ 下
-比如 your/we/path/`index.we` 
可以通过http://lcoalhost:8088/weex/index.js访问  
-your/we/path/`demo/test.we` 
可以通过http://lcoalhost:8088/weex/demo/index.js  
-
--e参数可以指定一个å…
¥å£çš„we文件,这个文件的地址会显示在`调试主页`上(作为二维ç
 )
-## 特性
-### 连接设备
-
-![devtools-main](https://img.alicdn.com/tps/TB13fwSKFXXXXXDaXXXXXXXXXXX-887-828.png)
-### Inspector
-
- Inspector 能够用来查看 `Element` \ `NetWork` \ `Console log` \ 
`ScreenCast` \ `BoxModel` \ `Native View` 等。
-
-![devtools-inspector](https://img.alicdn.com/tps/TB1O.nwKFXXXXX8XpXXXXXXXXXX-1436-811.png)
-#### Element
-
-![inspector-element](https://img.alicdn.com/tps/TB1.02bKFXXXXXwaXXXXXXXXXXX-2880-1800.png)
-#### NetWork
-##### 查看网络请求的总耗时和延时
-
-![inspector-network](https://img.alicdn.com/tps/TB1NjO_KFXXXXcaaXXXXXXXXXXX-2880-1800.png)
-##### 查看网络请求的header和response
-
-![inspector-network](https://img.alicdn.com/tps/TB1ck6lKFXXXXbZXFXXXXXXXXXX-2880-1800.png)
-#### 控制台
-
-![inspector-console](https://img.alicdn.com/tps/TB1a7HqKFXXXXXMXFXXXXXXXXXX-2880-1800.png)
-#### 资源
-
-![inspector-resource](https://img.alicdn.com/tps/TB1oY6cKFXXXXXQaXXXXXXXXXXX-2880-1800.png)
-### Debugger
-
- 调试器用来调试weex中的js代码,能够设置断点、查看调用æ 
ˆã€‚ 
-
-![devtools-debugger](https://img.alicdn.com/tps/TB1aPTEKFXXXXXaXXXXXXXXXXXX-1436-813.png)
-##### Breakpoint and CallStack
-
-![debugger-breakpoint](https://img.alicdn.com/tps/TB1_trbKFXXXXc0XVXXXXXXXXXX-2880-1800.png)
-#### 集成devtools
-- Android
-  - 请参考文档 [Weex devtools 
(Android)](../../references/advanced/integrate-devtool-to-android.html), å…
¶ä¸­æœ‰è¯¦ç»†è¯´æ˜Žã€‚
-- IOS
-  - 请参考文档 [Weex devtools 
(iOS)](../../references/advanced/integrate-devtool-to-ios.html), å…
¶ä¸­æœ‰è¯¦ç»†è¯´æ˜Žã€‚

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/how-it-works.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/how-it-works.md 
b/doc/source/cn/guide/intro/how-it-works.md
index 4480005..51319e1 100644
--- a/doc/source/cn/guide/intro/how-it-works.md
+++ b/doc/source/cn/guide/intro/how-it-works.md
@@ -1,7 +1,7 @@
 ---
 title: 工作原理
 type: guide
-order: 4.1
+order: 5.1
 has_chapter_content: false
 chapter_title: 优势介绍
 version: 2.1

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/index.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/index.md 
b/doc/source/cn/guide/intro/index.md
index 1ebcb4b..90e01a4 100644
--- a/doc/source/cn/guide/intro/index.md
+++ b/doc/source/cn/guide/intro/index.md
@@ -1,7 +1,7 @@
 ---
 title: 介绍 
 type: guide
-order: 4
+order: 5
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/page-architecture.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/page-architecture.md 
b/doc/source/cn/guide/intro/page-architecture.md
index 296ee98..17b7d16 100644
--- a/doc/source/cn/guide/intro/page-architecture.md
+++ b/doc/source/cn/guide/intro/page-architecture.md
@@ -1,7 +1,7 @@
 ---
 title: Weex 页面结构
 type: guide
-order: 4.6
+order: 5.6
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/using-vue.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/using-vue.md 
b/doc/source/cn/guide/intro/using-vue.md
index 3083340..42ad984 100644
--- a/doc/source/cn/guide/intro/using-vue.md
+++ b/doc/source/cn/guide/intro/using-vue.md
@@ -1,7 +1,7 @@
 ---
 title: 使用 Vue 开发 Weex 页面
 type: guide
-order: 4.3
+order: 5.3
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/web-dev-experience.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/web-dev-experience.md 
b/doc/source/cn/guide/intro/web-dev-experience.md
index 03d33e4..d7f6163 100644
--- a/doc/source/cn/guide/intro/web-dev-experience.md
+++ b/doc/source/cn/guide/intro/web-dev-experience.md
@@ -1,7 +1,7 @@
 ---
 title: Web 开发体验
 type: guide
-order: 4.2
+order: 5.2
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/intro/write-once.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/intro/write-once.md 
b/doc/source/cn/guide/intro/write-once.md
index b5ecf07..e880f48 100644
--- a/doc/source/cn/guide/intro/write-once.md
+++ b/doc/source/cn/guide/intro/write-once.md
@@ -1,7 +1,7 @@
 ---
 title: 一次撰写,多端运行
 type: guide
-order: 4.4
+order: 5.4
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/set-up-env.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/set-up-env.md 
b/doc/source/cn/guide/set-up-env.md
new file mode 100644
index 0000000..79ff249
--- /dev/null
+++ b/doc/source/cn/guide/set-up-env.md
@@ -0,0 +1,126 @@
+---
+title: 搭建开发环境 
+type: guide
+order: 2
+version: 2.1
+has_chapter_content: true
+---
+
+# 搭建开发环境
+
+使用 dotWe 对 Weex 尝鲜是一个不错的选择,但如果你
想更专业的开发 Weex, dotWe 就不怎么够用了。本节会教你
如何搭建本地开发环境进行 Weex 开发。
+
+## 第一步:安装依赖
+
+Weex 官方提供了 weex-toolkit 的脚手架工具来辅
助开发和调试。首先,你需要 Node.js 和 weex-toolkit。
+
+安装 Node.js 方式多种多样,最简单的方式是在 [Node.js 
官网](https://nodejs.org/en/) 下载可执行程序直接安装即可。
+
+对于 Mac,可以使用 [Homebrew](http://brew.sh/) 进行安装:
+
+```bash
+brew install node
+```
+
+> 更多安装方式可参考 [Node.js 
官方信息](https://nodejs.org/en/download/)
+
+安装完成后,可以使用以下命令检测是否安装成功:
+
+```bash
+$ node -v
+v6.3.1
+$ npm -v
+3.10.3
+```
+
+通常,安装了 Node.js 环境,npm 包管理工具也随之安装了。因
此,直接使用 npm 来安装 weex-toolkit。
+
+> npm 是一个 JavaScript 包管理工具,它可以让开发者轻松å…
±äº«å’Œé‡ç”¨ä»£ç ã€‚Weex 很多依赖来自社区,同样,Weex 
也将很多工具发布到社区方便开发者使用。
+
+**注意: ** weex-toolkit 在 1.0.1 之后才支持初始化 Vue 
项目,使用前请确认版本是否正确。
+
+```bash
+$ npm install -g weex-toolkit
+$ weex -v
+
+v1.0.3
+weex-builder : v0.2.4
+weex-previewer : v1.3.4
+```      
+
+国内开发者可以考虑使用淘宝的 npm 镜像 —— 
[cnpm](https://npm.taobao.org/) 安装 weex-toolkit
+
+```bash
+$ npm install -g cnpm
+$ cnpm install -g weex-toolkit
+```
+
+*提示:*
+
+如果提示权限错误(*permission error*),使用 `sudo` å…
³é”®å­—进行安装
+
+```bash
+$ sudo cnpm install -g weex-toolkit
+```
+
+安装结束后你可以直接使用 `weex` 命令验证是否安装
成功,它会显示 `weex` 命令行工具各参数:
+
+![](https://img.alicdn.com/tps/TB1kHFrOFXXXXaYXXXXXXXXXXXX-615-308.jpg)
+
+## 第二步:初始化
+
+然后初始化 Weex 项目:
+
+```bash
+$ weex init awesome-project
+```
+
+执行完命令后,在 `awesome-project` 目录中就创建了一个使用 
Weex 和 Vue 的模板项目。
+
+## 第三步:开发
+
+之后我们进入项目所在路径,weex-toolkit 已经为我们生成了æ 
‡å‡†é¡¹ç›®ç»“构。
+
+在 `package.json` 中,已经配置好了几个常用的 npm 
script,分别是:
+
+- `build`: 源码打包,生成 JS Bundle
+- `dev`: webpack watch 模式,方便开发
+- `serve`: 开启静态服务器
+- `debug`: 调试模式
+
+我们先通过 `npm install` 安装项目依赖。之后运行 `npm run dev` 
和 `npm run serve` 开启watch 模式和静态服务器。
+
+然后我们打开浏览器,进入 `http://localhost:8080/index.html` 
即可看到 weex h5 页面。 
+
+初始化时已经为我们创建了基本的示例,我们可以在 
`src/foo.vue` 中查看。
+
+代码如下所示:
+
+```html
+<template>
+  <div class="wrapper">
+    <text class="weex">Hello Weex !</text>
+    <text class="vue">Hello Vue !</text>
+  </div>
+</template>
+
+<style scoped>
+  .wrapper {
+    flex-direction: column;
+    justify-content: center;
+  }
+  .weex {
+   font-size: 60px;
+   text-align: center;
+   color: #1B90F7;
+  }
+  .vue {
+   font-size: 60px;
+   text-align: center;
+   margin-top: 30px;
+   color: #41B883;
+  }
+</style>
+```
+
+关于 Weex 语法部分,你可以直接参考 [Vue 
Guide](https://vuejs.org/v2/guide/),这里不再重复介绍。如果您想了解有å
…³æŠ€æœ¯è¯¦æƒ…的更多信息,请继续阅
读下一节。并且不要忘记在 dotWe 写代码并随时预览。

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/tools/devtools.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/tools/devtools.md 
b/doc/source/cn/guide/tools/devtools.md
new file mode 100644
index 0000000..f1c4dbc
--- /dev/null
+++ b/doc/source/cn/guide/tools/devtools.md
@@ -0,0 +1,111 @@
+---
+title: 使用 Devtools
+type: guide
+order: 4.1
+version: 2.1
+has_chapter_content: true
+---
+
+# Devtools
+
+**weex devtools** 是专门为 Weex 定制的一款实现了 [**Chrome 
Debugging 
Protocol**](https://developer.chrome.com/devtools/docs/debugger-protocol) 的 
inspect/debug 工具,能够帮助你快速查看 app 运行状态和调试 
weex 中的 Javascript 代码,当前支持 **iOS** 和 **Android** 
两个平台。
+
+1. 支持 Android 和 iOS 调试
+2. 支持真机和模拟器
+3. 可以检查 native Elements, vdom, network, Console, Resource
+4. 可以调试 js/wx/Rx 等前端源码文件
+5. 支持同时在前端文件和 native (Android/iOS) 文件上断点调试
+6. 支持远程调试,不需要真机 USB 连接电脑
+7. 支持 screencast 和 select element 功能
+8. 支持同时调试多个应用和客户端
+
+## 安装
+
+```
+$ npm install  -g  weex-toolkit
+```
+
+## 用法
+
+ weex debug [options] [we_file|bundles_dir]
+
+  选项:
+
+```
+-h, --help           显示帮助
+-V, --verbose        显示 debug 服务器运行时的各种 log
+-v, --version        显示版本
+-p, --port [port]    设置 debug 服务器端口号 默认为 8088
+-e, --entry [entry]  debug 一个目录时,这个参数指定整个目录的å…
¥å£ bundle 文件,这个 bundle 
文件的地址会显示在debug主页上(作为二维码)
+-m, --mode [mode]    设置构建we文件的方式, transformer 
最基础的风格适合单文件, loader:wepack 风格 
适合模块化的多文件。默认为 transformer
+```
+
+#### 开启调试
+
+```
+$ weex debug
+```
+
+单纯启动一个调试服务器,并同时唤起chrome浏览器打开`调试主页`.
+这个`调试主页`上会有一个二维码,使用Playground 
App扫这个二维码可以开启Playground调试.
+开启调试后,设备列表中会出现您的设备,æ 
¹æ®æç¤ºè¿›è¡ŒåŽç»­çš„调试操作
+#### 调试 we文件
+
+```
+$weex debug your_weex.we
+```
+
+这个命令会将your_weex.we编译成bundlejs文件 部署到debug服务器
+并启动debug服务器如上述命令那æ 
·.打开的`调试主页`会多显示一个二维码,使用playground app
+扫这个码可以加载your_weex.we.(注意要先扫描开启调试的那个ç 
)
+这个命令会自动检测your_weex.we文件变动,如果发现内
容被修改则立即重新编译部署,并刷新debugger页面
+.
+#### 调试整个bundle/we文件夹
+
+```
+$weex debug your/we/path  -e index.we
+```
+
+这个命令会编译你
指定目录下的所有的we文件,并把编译好的bundlejs部署到debug服务器,他们的地址会æ˜
 å°„到 http://lcoalhost:8088/weex/ 下
+比如 your/we/path/`index.we` 
可以通过http://lcoalhost:8088/weex/index.js访问  
+your/we/path/`demo/test.we` 
可以通过http://lcoalhost:8088/weex/demo/index.js  
+
+-e参数可以指定一个å…
¥å£çš„we文件,这个文件的地址会显示在`调试主页`上(作为二维ç
 )
+## 特性
+### 连接设备
+
+![devtools-main](https://img.alicdn.com/tps/TB13fwSKFXXXXXDaXXXXXXXXXXX-887-828.png)
+### Inspector
+
+ Inspector 能够用来查看 `Element` \ `NetWork` \ `Console log` \ 
`ScreenCast` \ `BoxModel` \ `Native View` 等。
+
+![devtools-inspector](https://img.alicdn.com/tps/TB1O.nwKFXXXXX8XpXXXXXXXXXX-1436-811.png)
+#### Element
+
+![inspector-element](https://img.alicdn.com/tps/TB1.02bKFXXXXXwaXXXXXXXXXXX-2880-1800.png)
+#### NetWork
+##### 查看网络请求的总耗时和延时
+
+![inspector-network](https://img.alicdn.com/tps/TB1NjO_KFXXXXcaaXXXXXXXXXXX-2880-1800.png)
+##### 查看网络请求的header和response
+
+![inspector-network](https://img.alicdn.com/tps/TB1ck6lKFXXXXbZXFXXXXXXXXXX-2880-1800.png)
+#### 控制台
+
+![inspector-console](https://img.alicdn.com/tps/TB1a7HqKFXXXXXMXFXXXXXXXXXX-2880-1800.png)
+#### 资源
+
+![inspector-resource](https://img.alicdn.com/tps/TB1oY6cKFXXXXXQaXXXXXXXXXXX-2880-1800.png)
+### Debugger
+
+ 调试器用来调试weex中的js代码,能够设置断点、查看调用æ 
ˆã€‚ 
+
+![devtools-debugger](https://img.alicdn.com/tps/TB1aPTEKFXXXXXaXXXXXXXXXXXX-1436-813.png)
+##### Breakpoint and CallStack
+
+![debugger-breakpoint](https://img.alicdn.com/tps/TB1_trbKFXXXXc0XVXXXXXXXXXX-2880-1800.png)
+#### 集成devtools
+- Android
+  - 请参考文档 [Weex devtools 
(Android)](../../references/advanced/integrate-devtool-to-android.html), å…
¶ä¸­æœ‰è¯¦ç»†è¯´æ˜Žã€‚
+- IOS
+  - 请参考文档 [Weex devtools 
(iOS)](../../references/advanced/integrate-devtool-to-ios.html), å…
¶ä¸­æœ‰è¯¦ç»†è¯´æ˜Žã€‚

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/tools/index.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/tools/index.md 
b/doc/source/cn/guide/tools/index.md
new file mode 100644
index 0000000..a9c5a26
--- /dev/null
+++ b/doc/source/cn/guide/tools/index.md
@@ -0,0 +1,11 @@
+---
+title: 周边工具 
+type: guide
+order: 4
+version: 2.1
+---
+
+# 周边工具  
+
+- [Devtools](./devtools.html)
+- [Weexpack](./weexpack.html)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/guide/tools/weexpack.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/tools/weexpack.md 
b/doc/source/cn/guide/tools/weexpack.md
new file mode 100644
index 0000000..ac64dd7
--- /dev/null
+++ b/doc/source/cn/guide/tools/weexpack.md
@@ -0,0 +1,388 @@
+---
+title: 使用 Weexpack
+type: guide
+order: 4.2
+version: 2.1
+---
+
+# 使用 Weexpack
+
+## weexpack 介绍
+
+weexpack 是 weex 新一代的工程开发套件,是基于 weex 
快速搭建应用原型的利器。它能够帮助开发者
通过命令行创建 Weex 工程,添加相应平台的 Weex app 
模版,并基于模版从本地、GitHub 或者 Weex 应用市场安装
插件,快速打包 Weex 应用并安装到手机运行,对于å…
·æœ‰åˆ†äº«ç²¾ç¥žçš„开发者而言还能够创建 Weex 
插件模版并发布插件到 Weex 应用市场。
+
+**注意:** weexpack 目前暂不支持搭建 Vue 2.0 版本的 Weex。
+
+weexpack 所提供的命令大致可分为三组,分别是:
+
+* 打包命令
+ * **weexpack create** — 创建 Weex 工程项目。
+ * **weexpack platform add/remove** — 安装/移除 Weex 
应用模版,默认模版支持 Weex bundle 调试和插件机制。
+ * **weexpack platform list** — 查看已安装的平台模版及版本。
+ * **weexpack platform run** - 打包应用并安装到设备运行。
+
+
+* 插件使用者命令
+ * **weexpack plugin add/remove** — 安装/移除 Weex 
插件,支持从本地、GitHub 或者  Weex 应用市场安装插件。
+
+ * **weexpack plugin list** — 查看已安装的插件及版本。
+
+
+* 插件开发者命令
+
+ * **weexpack plugin create** - 生成 Weex 插件模版,主要是é…
ç½®æ–‡ä»¶å’Œå¿…需的目录。
+ * **weexpack plugin publish** - 发布插件到 Weex 插件市场。
+
+
+## 安装
+
+### 环境要求
+
+ - 目前支持 Mac、windows、linux 平台 ( windows 下仅能打包 android 
)。
+ - 配置 [Node.js][1] 环境,并且安装 [npm][2] 包管理器 (`需要 
node6.0+`)。
+ - 如果要支持 iOS 平台则需要配置 iOS 开发环境:
+     - 安装 [Xcode IDE][3] ,启动一次 Xcode ,使 Xcode 自动安装
开发者工具和确认使用协议。
+     - 安装 cocoaPods。
+ - 如果要支持 Android 平台则需要配置 Android 开发环境:
+    - 安装 [Android Studio][4](推荐)或者 [Android SDK][7]。打开 
[AVD Manager][5] ,新建 Android 模拟器并启动(如果有安装 
[Docker][6] ,请关闭 Docker Server )。
+    - 保证 Android build-tool 的版本为 23.0.2。
+
+#### 安装命令
+
+首先,全局安装 weex-pack 命令:
+
+```bash
+$ npm install -g weexpack
+```
+
+或者 在 clone 的 weexpack 根目录下执行
+
+```bash
+$ npm install
+```
+
+## 打包及插件使用
+
+打包主要过程如下图所示,其中插件操作是打包
过程的可选项,不是必须的。
+
+![weexpack1](https://img.alicdn.com/tps/TB1.bpVPXXXXXarapXXXXXXXXXX-462-310.png)
+
+### 详细步骤
+
+#### 1. 创建 weexpack 工程
+
+```bash
+$ weexpack create appName
+```
+
+生成工程的目录如下:
+
+```
+WeexProject
+├── README.md
+├── android.config.json
+├── config.xml
+├── hooks
+│   └── README.md
+├── ios.config.json
+├── package.json
+├── platforms     // 平台模版目录
+├── plugins       // 插件下载目录
+│   └── README.md
+├── src           // 业务代码(we文件)目录
+│   └── index.we
+├── start
+├── start.bat
+├── tools
+│   └── webpack.config.plugin.js
+├── web
+│   ├── index.html
+│   ├── index.js
+│   └── js
+│       └── init.js
+└── webpack.config.js
+```
+
+通过 create 命令创建的工程默认不包含 iOS 和 Android 
工程模版,创建完成之后就可以切换到 appName 目录下并安装
依赖。
+
+```bash
+$ cd appName && npm install
+```
+
+#### 2. 安装 Weex 应用模版
+
+添加应用模版,官方提供的模版默认支持 Weex bundle 
调试和插件机制,注意模版名称均为小写,模版被安装到 
platforms 目录下。
+
+* android 模版
+
+  ```bash
+  $ weexpack platform add android
+  ```
+
+* iOS 模版
+
+  ```bash
+  $ weexpack platform add ios
+  ```
+
+android 平台,安装后 platforms 目录如下
+
+```
+platforms
+└── android
+    ├── LICENSE
+    ├── NOTICE
+    ├── README.md
+    ├── app
+    │   ├── build
+    │   ├── build.gradle
+    │   ├── proguard-rules.pro
+    │   └── src
+    ├── appframework
+    │   ├── build
+    │   ├── build.gradle
+    │   ├── proguard-rules.pro
+    │   └── src
+    ├── build
+    │   └── generated
+    ├── build.gradle
+    ├── codeStyleSettings.xml
+    ├── gradle
+    │   └── wrapper
+    ├── gradle.properties
+    ├── gradlew
+    ├── gradlew.bat
+    ├── settings.gradle
+    └── weexplugin
+        ├── build.gradle
+        ├── proguard-rules.pro
+        └── src 
+                              
+```
+
+ios平台,安装后 platforms 目录如下
+  
+```
+platforms
+   └── ios
+       ├── LICENSE
+       ├── Podfile
+       ├── README.md
+       ├── WeexDemo
+       │   ├── AppDelegate.h
+       │   ├── AppDelegate.m
+       │   ├── Assets.xcassets
+       │   ├── DemoDefine.h
+       │   ├── Images.xcassets
+       │   ├── WeexConfig
+       │   ├── WeexDemo-Info.plist
+       │   ├── WeexScanner
+       │   ├── config.xml
+       │   ├── main.m
+       │   └── weex-icon.png
+       ├── WeexDemo.xcodeproj
+       │   ├── project.pbxproj
+       │   ├── project.xcworkspace
+       │   ├── xcshareddata
+       │   └── xcuserdata
+       ├── WeexDemo.xcworkspace
+       │   ├── contents.xcworkspacedata
+       │   ├── xcshareddata
+       │   └── xcuserdata
+       ├── WeexDemoTests
+       │   ├── Info.plist
+       │   └── WeexDemoTests.m
+       ├── WeexUITestDemo-Info.plist
+       ├── WeexUITestDemoUITests
+       │   ├── Info.plist
+       │   └── WeexUITestDemoUITests.m
+       ├── Weexplugin
+       │   ├── Podfile
+       │   ├── Weexplugin
+       │   ├── Weexplugin.podspec
+       │   ├── Weexplugin.xcodeproj
+       │   └── WeexpluginTests
+       ├── bundlejs
+  
+  ```
+
+对于已安装的模版可以使用 weexpack platform list 命令查看。
+
+* 查看已安装模版
+
+  ```bash
+  $ weexpack platform list
+  ```
+
+  示例结果:
+
+  ```
+  Installed platforms:
+    android
+  Available platforms:
+    android ^6.2.1
+  ```
+    
+如果想要删除某个不需要的平台可以使用 weexpack platform 
remove 移除,比如 Windows 平台用户是不需要 iOS 
模版的,可用如下命令移除。
+
+
+* 移除相应平台模版
+
+  ```bash
+  $ weexpack platform remove ios
+  ```
+
+#### 3. 安装 Weex 插件(可选项)
+
+添加想要使用的插件,支持从本地或者 Weex 应用市场安装
插件。
+
+* 从本地添加插件,在开发插件时会经常用到
+
+  ```bash
+  $ weexpack plugin add path/to/plugin
+  ```
+
+* 从插件市场添加插件,例如 weex-chart。
+
+  ```bash
+  $ weexpack plugin add weex-chart
+  ```
+
+模版的 weexplugin 是插件安装的目标工程。以 Android 为例,å…
¶ç›®å½•如下:
+
+```
+weexplugin
+├── build.gradle  //  插件编译脚本,工具自动维护
+├── libs
+├── proguard-rules.pro
+├── src
+│   └── main
+│       ├── AndroidManifest.xml // 插件android manifest配置文件
+│       ├── java
+│       │   ├── // 插件src安装目录
+│       │   └── com
+│       │       └── alibaba
+│       │           └── weex
+│       │               └── plugin
+│       │                   ├── ConfigXmlParser.java // é…
ç½®æ–‡ä»¶è§£æžå™¨
+│       │                   ├── PluginConfig.java    // 外部接口
+│       │                   ├── PluginEntry.java     // 插件描述
+│       │                   └── PluginManager.java   // 
插件管理器
+│       └── res // 插件资源安装目录
+│           ├── drawable
+│           ├── values
+│           │   └── strings.xml
+│           └── xml
+│               └── config.xml // 插件配置文件,PluginManager 
解析配置文件加载插件
+```
+
+对于已安装的插件可以使用 weexpack plugin list 命令查看。
+
+* 查看已安装插件
+
+  ```bash
+  $ weexpack plugin list
+  ```
+
+如果想要删除某个不需要的插件可以使用 weexpack plugin remove 
移除,比如 weex-chart
+
+* 移除插件,例如 weex-chart
+
+  ```bash
+  $ weexpack plugin remove weex-chart
+  ```
+
+
+
+#### 4. 打包应用并安装运行
+
+完成以上步骤并 Weex 代码放在 src 目录下,就可以打包
运行了,打包过程中可能要下载依赖和编译工å…
·ï¼Œè¿™ä¼šæ˜¯ä¸ªè¾ƒä¸ºè€—时的过程,安装运行需要打开模拟器或者
连接设备。
+
+* 打包运行 android 应用
+
+  ```bash
+  $ weexpack run android
+  ```
+
+  你可以更改项目目录下的 android.config.json
+    * AppName: 应用名
+    * AppId: application_id 包名
+    * SplashText: 欢迎页上面的文字
+    * WeexBundle: 指定的 Weex bundle 文件(支持文件名和 url 
的形式)
+
+  文件名则以本地文件的方式加载 bundle, url 
则以远程的方式加载 bundle
+  如果以本地方式指定 bundle, `.we` 文件请放到 src 目录。
+
+* 打包运行 iOS 应用
+  * 模拟器运行
+
+  ```bash
+  $ weexpack run ios
+  ```
+
+  * 构建 ipa 包
+
+  ```bash
+  $ weexpack build ios
+  ```
+
+  构建包的过程中,将会提示让您输入 
`CodeSign(证书)`,`Profile(provisioning profile)`,`AppId`,只有输å…
¥çœŸå®žçš„这些信息才能成功打包。
+  其余如 AppName , 和入口 Weex bundle 
文件可以编辑项目目录下的 ios.config.json 配置。
+  打完包成功之后,可以在 `/playground/build/ipa_build/` 
目录下获取 ipa 文件
+
+  **注:证书需要预先安装到 keychain 中,在 keychain 
中点击右键获取证书 `id`(证书名称),`provisioning profile` 
文件(*mobileprovision)需要获取 UUID,进å…
¥[目录](https://github.com/weexteam/weex-pack/tree/dev/generator/platforms/templates)
 可以看到 `mobileprovision_UUID.sh` 文件,此文件可以获取到 UUID**
+
+  `mobileprovision_UUID.sh` 用法如下:
+  
+  ```bash
+  $  ./mobileprovision_UUID.sh   \*mobileprovision
+  ```
+
+  参数(\*mobileprovision)为 `provisioning profile` 文件路径
+
+* 打包 Web 平台:
+
+  ```bash
+  $ weexpack build web
+  ```
+     
+  这样你可以把打包后的资源上传到 CDN 服务器,然后上线你
的 Web 项目。
+  
+* 在 Web 平台运行:
+
+  ```bash
+  $ weexpack run web
+  ```
+     
+#### 5.现有应用集成插件 —— 组件容器
+
+* 组件容器作用
+
+  
插件可以通过组件容器的方式集成到客户端(app),组件容器可以方便生成二进制åŒ
…,现有应用可以通过各种形式把二进制包或源ç 
é›†æˆè¿›åŽ»ï¼Œæ¯”å¦‚ iOS 可以通过 pod 依赖   的形式等。在 
weexpack 创建的根目录下,运行 weexpack plugin add/remove 
命令直接安装/删除 Weex plugin 到组件容器中。
+
+* 组件容器获取
+       * 方式1:通过第二步<sup>[[link](#weex-plugin)]</sup>生成的 
Android/iOS 目录中包含 Weexplugin 目录,此目录是组件容器
+       * 方式2:通过 repo 地址 clone 代码 
[iOS地址](https://github.com/weexteam/weexpluginContainer-iOS) [Android 
地址](https://github.com/weexteam/weexplugin-android) 
+
+## 插件发布
+
+对于插件开发者
来说,也有一组用于创建和发布插件的命令,[前往](./README_plugin.md)
 查看详细文档
+
+![weexpack2](https://img.alicdn.com/tps/TB18hxjPXXXXXXgapXXXXXXXXXX-248-258.png)
+
+## 插件开发文档
+
++ [开发 web 的插件教程](./doc/plugin-devloping-web.md)
+
+
+## 示例
+[使用 Weexpack 打包出一个 Weex 版的 《One 
App》](https://github.com/weexteam/weex-pack/wiki/Create-Weex-One-App-with-Weexpack)
+
+[1]: https://nodejs.org/
+[2]: https://www.npmjs.com/
+[3]: https://itunes.apple.com/us/app/xcode/id497799835?mt=12
+[4]: https://developer.android.com/studio/install.html
+[5]: https://developer.android.com/studio/run/managing-avds.html
+[6]: https://www.docker.com/
+[7]: https://developer.android.com/studio/releases/sdk-tools.html
+[8]: https://developer.android.com/studio/run/managing-avds.html

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/references/common-style.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/common-style.md 
b/doc/source/cn/references/common-style.md
index 033a45c..4c12380 100644
--- a/doc/source/cn/references/common-style.md
+++ b/doc/source/cn/references/common-style.md
@@ -91,15 +91,16 @@ Weex 对于长度值目前只支持*像素
*值,不支持相对单位(`em`、
 
 
 ### 注意:
+
 Weex 盒模型的 `box-sizing` 默认为 `border-box`,即盒子的宽高包
含内容、内边距和边框的宽度,不包含外边距的宽度。
 
-目前在 `<image>` 组件上尚无法只定义一个或几个角的 
`border-radius`。比如你无法在这两个组件上使用 
`border-top-left-radius`。该约束只对iOS生效,Android并不受此限制。
+目前在 `<image>` 组件上尚无法只定义一个或几个角的 
`border-radius`。比如你无法在这两个组件上使用 
`border-top-left-radius`。该约束只对 iOS 生效,Android 
并不受此限制。
 
-尽管 `overflow:hidden` 
在android上是默认行为,但只有下列条件都满足时,一个父view才会去clip它的子view。这个限制只对Android生效,iOS不受影响。
+尽管 `overflow:hidden` 在 Android 
上是默认行为,但只有下列条件都满足时,一个父 view 
才会去 clip 它的子 view。这个限制只对 Android 生效,iOS 
不受影响。
 * 父view是`div`, `a`, `cell`, `refresh` 或 `loading`。
-* 系统版本是Android 4.3或更高。
-* 系统版本不是Andorid 7.0。
-* 父view没有`background-image`属性或系统版本是Android 
5.0或更高。
+* 系统版本是 Android 4.3 或更高。
+* 系统版本不是 Andorid 7.0。
+* 父 view 没有 `background-image` 属性或系统版本是 Android 5.0 
或更高。
 
 ### 示例:
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/cn/references/components/scroller.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/components/scroller.md 
b/doc/source/cn/references/components/scroller.md
index 694ce87..297f712 100644
--- a/doc/source/cn/references/components/scroller.md
+++ b/doc/source/cn/references/components/scroller.md
@@ -33,10 +33,10 @@ version: 2.1
 
 - `show-scrollbar {boolean}`:可选值为 `true`/ `false`,默认值为 
`true`。控制是否出现滚动条。
 - `scroll-direction {string}`:可选为 `horizontal` 或者 
`vertical`,默认值为 `vertical` 。定义滚动的方向。
-  - 
`scroll-direction`定义了scroller的滚动方向,`flex-direction`定义了scroller的布局方向,两个方向å¿
…须一致。
-  - 
`scroll-direction`的默认值是`vertical`,`flex-direction`的默认值是`row`。
-  - 
当需要一个水平方向的scroller时,使用`scroll-direction:horizontal`和`flex-direction:
 row`。
-  - 
当需要一个竖直方向的scroller时,使用`scroll-direction:vertical`和`flex-direction:
 
column`。由于这两个值均是默认值,当需要一个竖直方向的scroller时,这两个值可以不设置。
+  - `scroll-direction`定义了 scroller 的滚动方向,`flex-direction` 
定义了 scroller 的布局方向,两个方向必须一致。
+  - `scroll-direction` 的默认值是 `vertical`, `flex-direction` 
的默认值是 `row`。
+  - 当需要一个水平方向的 scroller 时,使用 
`scroll-direction:horizontal` 和 `flex-direction: row`。
+  - 当需要一个竖直方向的 scroller 时,使用 
`scroll-direction:vertical` 和 `flex-direction: 
column`。由于这两个值均是默认值,当需要一个竖直方向的 
scroller 时,这两个值可以不设置。
 - `loadmoreoffset {number}`:默认值为 0,触发 `loadmore` 
事件所需要的垂直偏移距离(设备屏幕底部与页面底部之间的距离)。当页面的滚动条滚动到足够接近页面底部时将会触发
 `loadmore` 这个事件。
 
   ![mobile_preview](../images/scroller_1.jpg)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/dev-with-weexpack.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/dev-with-weexpack.md 
b/doc/source/guide/dev-with-weexpack.md
deleted file mode 100644
index 9dd9b42..0000000
--- a/doc/source/guide/dev-with-weexpack.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: Build A New App  
-type: guide
-order: 2
-version: 2.1
-has_chapter_content: true
----
-
-# Build a New App
-
-
-Work in progress.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/index.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/index.md b/doc/source/guide/index.md
index 6c11d54..c43176a 100644
--- a/doc/source/guide/index.md
+++ b/doc/source/guide/index.md
@@ -56,55 +56,3 @@ As shown in the following code:
 It's too easy,right? Let's focus on the syntax, obviously this is vue.
 
 You can try to modify the Hello World, then generate a new QR code to scan.
-
-## Set up development environment 
-
-Use dotWe is a good choice, But if you want to develop locally on your own 
machine, you will set up your development environment.
-
-You will need Node.js and the Weex CLi.
-
-You can installing Node using [nvm](https://github.com/creationix/nvm) (Simple 
bash script to manage multiple active node.js versions). Run the following 
commands in a Terminal after installing nvm:
-
-```bash
-$ nvm install 6.10.0
-$ nvm use 6.10.0
-```
-
-Node.js comes with npm, which lets you install the Weex Cli.
-
-Run the following command in a Terminal:
-
-```bash
-$ npm install -g weex-toolkit@beta
-```
-
-**NOTE: ** If you get an error like "permission error",  try installing with 
`sudo`.
-
-
-Then you can use the weex command to verify that the installation is 
successful:
-
-![](https://img.alicdn.com/tps/TB1kHFrOFXXXXaYXXXXXXXXXXXX-615-308.jpg)
-
-### Generate a new Weex project
-
-You can use CLi to generate a Weex project called "awesome-project". Run the 
following command in a Terminal:
-
-```bash
-$ weex init awesome-project
-```
-
-Then we enter the awesome-project folder, the CLi has been for us to generate 
a standard project structure.
-
-### Usage
-
-We enter the awesome-project folder and install dependencies with the 
following commands:
-
-```bash
-npm install
-```
-
-Then we run `npm run dev` and `npm run serve` to start watch mode and static 
server.
-
-Finally, we can see the Weex page in `http://localhost:8080/index.html`.
-
-If you're curious to learn more about technical details, continue on to the 
next. And don't forget to write code at [dotWe](https://dotwe.org) and preview 
at anytime.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/app-architecture.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/app-architecture.md 
b/doc/source/guide/intro/app-architecture.md
index d7b3bc6..5dd1e1f 100644
--- a/doc/source/guide/intro/app-architecture.md
+++ b/doc/source/guide/intro/app-architecture.md
@@ -1,7 +1,7 @@
 ---
 title: Mobile App Architecture
 type: guide
-order: 4.5
+order: 5.5
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/devtools.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/devtools.md 
b/doc/source/guide/intro/devtools.md
index 3104e02..f9b32b4 100644
--- a/doc/source/guide/intro/devtools.md
+++ b/doc/source/guide/intro/devtools.md
@@ -1,7 +1,7 @@
 ---
 title: Using Devtools  
 type: guide
-order: 4.7
+order: 5.7
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/how-it-works.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/how-it-works.md 
b/doc/source/guide/intro/how-it-works.md
index f67f8b4..e66ead8 100644
--- a/doc/source/guide/intro/how-it-works.md
+++ b/doc/source/guide/intro/how-it-works.md
@@ -1,7 +1,7 @@
 ---
 title: How it works  
 type: guide
-order: 4.1
+order: 5.1
 has_chapter_content: false
 chapter_title: Intro
 version: 2.1

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/index.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/index.md b/doc/source/guide/intro/index.md
index 24c8236..54117fc 100644
--- a/doc/source/guide/intro/index.md
+++ b/doc/source/guide/intro/index.md
@@ -1,7 +1,7 @@
 ---
 title: Intro
 type: guide
-order: 4
+order: 5
 has_chapter_content: false
 chapter_title: Intro
 version: 2.1

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/page-architecture.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/page-architecture.md 
b/doc/source/guide/intro/page-architecture.md
index a9d8014..77085f9 100644
--- a/doc/source/guide/intro/page-architecture.md
+++ b/doc/source/guide/intro/page-architecture.md
@@ -1,7 +1,7 @@
 ---
 title: Weex Page Architecture
 type: guide
-order: 4.6
+order: 5.6
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/using-vue.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/using-vue.md 
b/doc/source/guide/intro/using-vue.md
index 9d981ee..0f08498 100644
--- a/doc/source/guide/intro/using-vue.md
+++ b/doc/source/guide/intro/using-vue.md
@@ -1,7 +1,7 @@
 ---
 title: Using Vue
 type: guide
-order: 4.3
+order: 5.3
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/web-dev-experience.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/web-dev-experience.md 
b/doc/source/guide/intro/web-dev-experience.md
index 81d0ff2..c24c8cc 100644
--- a/doc/source/guide/intro/web-dev-experience.md
+++ b/doc/source/guide/intro/web-dev-experience.md
@@ -1,7 +1,7 @@
 ---
 title: Web Dev Experience
 type: guide
-order: 4.2
+order: 5.2
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/intro/write-once.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/intro/write-once.md 
b/doc/source/guide/intro/write-once.md
index 382b7b4..9507d21 100644
--- a/doc/source/guide/intro/write-once.md
+++ b/doc/source/guide/intro/write-once.md
@@ -1,7 +1,7 @@
 ---
 title: Write once, Run Everywhere
 type: guide
-order: 4.4
+order: 5.4
 version: 2.1
 ---
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/set-up-env.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/set-up-env.md b/doc/source/guide/set-up-env.md
new file mode 100644
index 0000000..338502b
--- /dev/null
+++ b/doc/source/guide/set-up-env.md
@@ -0,0 +1,93 @@
+---
+title: Set Up Development Environment 
+type: guide
+order: 2
+version: 2.1
+has_chapter_content: true
+---
+
+# Set up development environment 
+
+Use dotWe is a good choice, But if you want to develop locally on your own 
machine, you will set up your development environment.
+
+You will need Node.js and the Weex CLi.
+
+You can installing Node using [nvm](https://github.com/creationix/nvm) (Simple 
bash script to manage multiple active node.js versions). Run the following 
commands in a Terminal after installing nvm:
+
+```bash
+$ nvm install 6.10.0
+$ nvm use 6.10.0
+```
+
+Node.js comes with npm, which lets you install the Weex Cli.
+
+Run the following command in a Terminal:
+
+```bash
+$ npm install -g weex-toolkit
+$ weex -v
+
+v1.0.3
+weex-builder : v0.2.4
+weex-previewer : v1.3.4
+```
+
+**NOTE: ** If you get an error like "permission error", try installing with 
`sudo`.
+
+
+Then you can use the weex command to verify that the installation is 
successful:
+
+![](https://img.alicdn.com/tps/TB1kHFrOFXXXXaYXXXXXXXXXXXX-615-308.jpg)
+
+### Generate a new Weex project
+
+You can use CLi to generate a Weex project called "awesome-project". Run the 
following command in a Terminal:
+
+```bash
+$ weex init awesome-project
+```
+
+Then we enter the awesome-project folder, the CLi has been for us to generate 
a standard project structure.
+
+### Usage
+
+We enter the awesome-project folder and install dependencies with the 
following commands:
+
+```bash
+npm install
+```
+
+Then we run `npm run dev` and `npm run serve` to start watch mode and static 
server.
+
+Finally, we can see the Weex page in `http://localhost:8080/index.html`.
+
+You can modify this page in `src/foo.vue`. The code is shown below:
+
+```html
+<template>
+  <div class="wrapper">
+    <text class="weex">Hello Weex !</text>
+    <text class="vue">Hello Vue !</text>
+  </div>
+</template>
+
+<style scoped>
+  .wrapper {
+    flex-direction: column;
+    justify-content: center;
+  }
+  .weex {
+   font-size: 60px;
+   text-align: center;
+   color: #1B90F7;
+  }
+  .vue {
+   font-size: 60px;
+   text-align: center;
+   margin-top: 30px;
+   color: #41B883;
+  }
+</style>
+```
+
+If you're curious to learn more about technical details, continue on to the 
next. And don't forget to write code at [dotWe](https://dotwe.org) and preview 
at anytime.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/tools/devtools.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/tools/devtools.md 
b/doc/source/guide/tools/devtools.md
new file mode 100644
index 0000000..9fd9de3
--- /dev/null
+++ b/doc/source/guide/tools/devtools.md
@@ -0,0 +1,100 @@
+---
+title: Using Devtools  
+type: guide
+order: 4.1
+version: 2.1
+---
+
+# Devtools
+
+Weex devtools is a custom devtools for weex that implements [Chrome Debugging 
Protocol](https://developer.chrome.com/devtools/docs/debugger-protocol), it is 
designed to help you quickly inspect your app and debug your JS bundle source 
in a chrome web page, both Android and IOS platform are supported.
+
+## Install
+
+```
+   $ npm install  -g  weex-toolkit
+```
+#### usage
+```
+weex debug [options] [we_file|bundles_dir]
+
+  Options:
+
+    -h, --help           output usage information
+    -V, --verbose        display logs of debugger server
+    -v, --version        display version
+    -p, --port [port]    set debugger server port
+    -e, --entry [entry]  set the entry bundlejs path when you specific the 
bundle server root path
+    -m, --mode [mode]    set build mode [transformer|loader]
+    -w, --watch          watch we file changes auto build them and refresh 
debugger page![default enabled]
+```
+
+#### start debugger
+```
+$weex debug
+```
+this command will start debug server and launch a chrome opening `DeviceList` 
page.
+this page will display a qrcode ,you can use `Playground App` scan it for 
starting debug.
+
+#### start debugger with a we file
+```
+$weex debug your_weex.we
+```
+this command will compile `your_weex.we` to `your_weex.js`  and start the 
debug server as upon command.
+`your_weex.js` will deploy on the server and displayed in `DeviceList` page as 
 another qrcode contain the url of your_weex.js
+
+
+#### start debugger with a directory of we files
+```
+$weex debug your/we/path  -e index.we
+```
+this command will build every file in your/we/path and deploy them on the 
bundle server. your directory will mapping to  http://localhost:port/weex/ 
+use -e to set the entry of these bundles. and the url of "index.we" will 
display on device list page as another qrcode.
+
+## Features
+
+### Connect devices
+![devtools-main](https://img.alicdn.com/tps/TB13fwSKFXXXXXDaXXXXXXXXXXX-887-828.png
 "connecting (multiple) devices")
+
+### Inspector
+ Inspector can be used to show your `Element` \ `Network` \ `Console log` \ 
`ScreenCast` \ `BoxModel` \ `Native View` and so on.
+
+![devtools-inspector](https://img.alicdn.com/tps/TB1O.nwKFXXXXX8XpXXXXXXXXXX-1436-811.png
 "devtools-inspector")
+
+#### Element
+##### native view element
+![native-element](https://img.alicdn.com/tps/TB16L3ENXXXXXcsXVXXXXXXXXXX-2878-1798.png
 "native-element")
+
+##### weex dom element
+![dom-element](https://img.alicdn.com/tps/TB1TsMuNXXXXXcsaXXXXXXXXXXX-2450-1460.png
 "dom-element")
+
+#### Network
+
+##### show the total time and latency
+![inspector-network](https://img.alicdn.com/tps/TB1NjO_KFXXXXcaaXXXXXXXXXXX-2880-1800.png
 "inspector-network")
+
+##### show the header and response
+![inspector-network](https://img.alicdn.com/tps/TB1ck6lKFXXXXbZXFXXXXXXXXXX-2880-1800.png
 "inspector-network")
+
+#### Console
+![inspector-console](https://img.alicdn.com/tps/TB1a7HqKFXXXXXMXFXXXXXXXXXX-2880-1800.png
 "inspector-console")
+
+#### Resource
+![inspector-resource](https://img.alicdn.com/tps/TB1oY6cKFXXXXXQaXXXXXXXXXXX-2880-1800.png
 "inspector-resource")
+
+### Debugger
+
+ Debugger can be used to debug your bundle js source, you can set `Breakpoint` 
\ watch `CallStack`.
+ 
+![devtools-debugger](https://img.alicdn.com/tps/TB1aPTEKFXXXXXaXXXXXXXXXXXX-1436-813.png
 "devtools-debugger")
+
+#### Breakpoint and CallStack
+![debugger-breakpoint](https://img.alicdn.com/tps/TB1_trbKFXXXXc0XVXXXXXXXXXX-2880-1800.png
 "debugger-breakpoint")
+
+
+## Integrate devtools
+
+* Android
+    * See the doc [Weex devtools 
(Android)](../../references/advanced/integrate-devtool-to-android.html), it 
will lead you to config and use it step by step.
+* IOS
+    * See the doc [Weex devtools 
(iOS)](../../references/advanced/integrate-devtool-to-ios.html), it will lead 
you to config and use it step by step.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/tools/index.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/tools/index.md b/doc/source/guide/tools/index.md
new file mode 100644
index 0000000..8a2de8e
--- /dev/null
+++ b/doc/source/guide/tools/index.md
@@ -0,0 +1,11 @@
+---
+title: Tools 
+type: guide
+order: 4
+version: 2.1
+---
+
+# Tools  
+
+- [Devtools](./devtools.html)
+- [Weexpack](./weexpack.html)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9dd6bdd4/doc/source/guide/tools/weexpack.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/tools/weexpack.md 
b/doc/source/guide/tools/weexpack.md
new file mode 100644
index 0000000..699431f
--- /dev/null
+++ b/doc/source/guide/tools/weexpack.md
@@ -0,0 +1,298 @@
+---
+title: Using Weexpack
+type: guide
+order: 4.2
+version: 2.1
+---
+
+# Using Weexpack
+
+## Weexpack introduction
+
+Weexpack is our next generation of engineering development kits, it helps to 
setup wWex application from scratch quickly. With simple commands, developers 
could create a Weex project, add different platform template, could install 
plugins from local, GitHub or Weex market, could pack up his application 
project and run on mobile. For those who would like to share his own plugins, 
he could publish them to the Weex market.
+
+weexpack commands can be grouped to three parts:
+* application package
+ * **weexpack create** — create Weex project.
+ * **weexpack platform add/remove** — add/remove Weex platform 
template,it support plugins and Weex bundle debugging by default.
+ * **weexpack platform list** — query installed platforms and its version.
+ * **weexpack platform run** - pack/build/run application.
+
+* plugin usuage
+ * **weexpack plugin add/remove** — add/remove Weex plugin, support to 
install from local, Github or market.
+ * **weexpack plugin list** — query installed plugins and its version.
+
+* plugin development
+ * **weexpack plugin create** - create plugin template with necessary config 
file and directory.
+ * **weexpack plugin publish** - publish plugin to market.
+
+
+## Installation
+### pre-environmental requirements
+
+- Supported on Mac linux windows.
+- Configure the [Node.js] [1] environment and install the [npm] [2] package 
manager.(need node 6.0+)
+- Configure iOS development environment:
+    - Install [Xcode IDE] [3] to launch Xcode once so that Xcode automatically 
installs the Developer Tools and confirms the usage protocol.
+    - Install cocoaPods
+- Configure the Android development environment:
+    - Install [Android Studio] [4] and open the new project. Open the menu 
bar, open the [AVD Manager] [5], the new Android emulator and start. (If you 
have installed [Docker] [6], close the Docker Server.)
+    - Or just download the [Android SDK] [7], run the command line [AVD 
Manager] [8], create a new Android emulator and launch it.
+    - Make sure that Android build-tool version is 23.0.2
+
+### Instructions
+
+First, install the weex-pack command globally:
+
+```bash
+$ npm install -g weexpack
+```
+
+or run the following command under the root path of your cloned weexpack repo
+
+```bash
+$ npm install
+```
+
+## Pack application (and plugin usuage)
+
+Following graph shows how to pack a application, plugin related parts werenot 
a must.
+
+![weexpack1](https://img.alicdn.com/tps/TB1.bpVPXXXXXarapXXXXXXXXXX-462-310.png)
+
+### Steps in detail
+
+#### 1. create a weexpack project
+
+```bash
+$ weexpack create appName
+```
+
+will create directory as follows:
+
+```
+WeexProject
+├── README.md
+├── android.config.json
+├── config.xml
+├── hooks
+│   └── README.md
+├── ios.config.json
+├── package.json
+├── platforms     // platform template directory
+├── plugins       // plugins download to here
+│   └── README.md
+├── src           // application(we/vue file)directory
+│   └── index.we
+├── start
+├── start.bat
+├── tools
+│   └── webpack.config.plugin.js
+├── web
+│   ├── index.html
+│   ├── index.js
+│   └── js
+│       └── init.js
+└── webpack.config.js
+```
+
+Above project template has no ios/android directory by default, you should 
change to appName path to install necessary dependency.
+
+```bash
+$ cd appName && npm install
+```
+
+#### 2. install Weex application template
+
+Application template by default support Weex plugins and Weex bundle 
debugging. Please note template name are in lower-case, template was installed 
under platforms directory.
+
+* android template
+
+```bash
+$ weexpack platform add android
+```
+
+* ios template
+
+```bash
+$ weexpack platform add ios
+```
+
+Take android platform as example,the directory under platforms looks as 
following:
+
+```
+platforms
+└── android
+    ├── LICENSE
+    ├── NOTICE
+    ├── README.md
+    ├── app
+    │   ├── build
+    │   ├── build.gradle
+    │   ├── proguard-rules.pro
+    │   └── src
+    ├── appframework
+    │   ├── build
+    │   ├── build.gradle
+    │   ├── proguard-rules.pro
+    │   └── src
+    ├── build
+    │   └── generated
+    ├── build.gradle
+    ├── codeStyleSettings.xml
+    ├── gradle
+    │   └── wrapper
+    ├── gradle.properties
+    ├── gradlew
+    ├── gradlew.bat
+    ├── settings.gradle
+    └── weexplugin
+        ├── build.gradle
+        ├── proguard-rules.pro
+        └── src
+
+```
+
+* query installed platforms
+
+  ```bash
+  $ weexpack platform list
+  ```
+
+  you will get result like:
+
+  ```
+  Installed platforms:
+    android
+  Available platforms:
+    android ^6.2.1
+  ```
+
+* remove platform template
+
+  Please use remove command to remove unnecessary platform, for example user 
want to remove ios template in windows platform.
+
+  ```bash
+  $ weexpack platform remove ios
+  ```
+
+#### 3. install Weex plugin(optional)
+
+* add plugins from local
+
+  ```bash
+  $ weexpack plugin add path/to/plugin
+  ```
+
+* add plugins from Weex market,for example weex-chart
+
+  ```bash
+  $ weexpack plugin add weex-chart
+  ```
+
+  weexplugin directory was the target directory where plugin was installed. 
Take android as an example:
+
+  ```
+    weexplugin
+    ├── build.gradle  //  plugin build script, maintained by weexpack 
tool
+    ├── libs
+    ├── proguard-rules.pro
+    ├── src
+    │   └── main
+    │       ├── AndroidManifest.xml // plugin android manifest file
+    │       ├── java
+    │       │   ├── // 插件src安装目录
+    │       │   └── com
+    │       │       └── alibaba
+    │       │           └── weex
+    │       │               └── plugin
+    │       │                   ├── ConfigXmlParser.java // config 
file parser
+    │       │                   ├── PluginConfig.java    // external 
interface
+    │       │                   ├── PluginEntry.java     // plugin 
description
+    │       │                   └── PluginManager.java   // plugin 
manager
+    │       └── res // plugin resource path
+    │           ├── drawable
+    │           ├── values
+    │           │   └── strings.xml
+    │           └── xml
+    │               └── config.xml // plugin config file, which used 
by PluginManager when install
+  ```
+
+* query installed plugins
+
+  ```bash
+  $ weexpack plugin list
+  ```
+
+* remove installed plugin,for example weex-chart
+
+  ```bash
+  $ weexpack plugin remove weex-chart
+  ```
+
+#### 4. pack application and run
+
+After all above steps, you could modify your application we/vue files under 
src directory. And then, use run command to pack and run your application. Run 
command will download building tools and all dependencies which may take a 
while, and open monitor or connect to mobile device to execute your application 
afterwards.
+
+* for android application
+
+  ```bash
+  $ weexpack run android
+  ```
+
+  You could modify your project information in android.config.json file:
+
+  - AppName: the name of the project
+  - AppId: application_id the name of the package
+  - SplashText: the text in welcome page
+  - WeexBundle: the bundle file (could be local file or remote url). For Local 
file please put your we/vue files under the src directory
+
+* for ios platform
+
+  * simulator
+
+    ```bash
+    $ weexpack run ios
+    ```
+
+  * Build ipa
+
+    ```bash
+    $ weexpack build ios
+    ```
+
+  this command will prompt for CodeSign, Profile(provisioning profile), AppId 
to build ipa. Other information like AppName, Weex bundle could be configured 
as you like in the file ios.config.json. After this command, ipa file could be 
created under the directory  `/playground/build/ipa_build/`.
+
+  Note: For details about various requirements to deploy to a device, refer to 
the Launch Your App On Devices section of Apple's [About App Distribution 
Workflows][9]. Briefly, you need to do the following before deploying:
+
+  1. CodeSign should be installed to keychain, click keychain to get the id;
+  2. provisioning profile need UUID. you could use the file 
mobileprovision_UUID.sh to generate UUID as follows:
+
+    ```
+    $ ./mobileprovision_UUID.sh abcpath
+    ```
+    abcpath is the path of provisioning profile file.
+
+* for Web platform
+
+  ```bash
+  $ weexpack run web
+  ```
+
+## Plugin development and publishment
+
+![weexpack2](https://img.alicdn.com/tps/TB18hxjPXXXXXXgapXXXXXXXXXX-248-258.png)
+
+## Examples
+
+ [Create Weex One App with 
Weexpack](https://github.com/weexteam/weex-pack/wiki/Create-Weex-One-App-with-Weexpack)
+
+  [1]: https://nodejs.org/
+  [2]: https://www.npmjs.com/
+  [3]: https://itunes.apple.com/us/app/xcode/id497799835?mt=12
+  [4]: https://developer.android.com/studio/install.html
+  [5]: https://developer.android.com/studio/run/managing-avds.html
+  [6]: https://www.docker.com/
+  [7]: https://developer.android.com/studio/releases/sdk-tools.html
+  [8]: https://developer.android.com/studio/run/managing-avds.html
+  [9]: 
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html

Reply via email to