You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/09/25 09:31:36 UTC

[1/3] incubator-weex git commit: * [html5] update start command for develop

Repository: incubator-weex
Updated Branches:
  refs/heads/dev f3beb7d86 -> db666a2f0


* [html5] update start  command for develop


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

Branch: refs/heads/dev
Commit: ab9ef1b24f65fd7f8edb858556d103f5e08634eb
Parents: a64ce53
Author: erha19 <fa...@gmail.com>
Authored: Fri Sep 22 17:03:33 2017 +0800
Committer: erha19 <fa...@gmail.com>
Committed: Fri Sep 22 17:03:33 2017 +0800

----------------------------------------------------------------------
 start | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ab9ef1b2/start
----------------------------------------------------------------------
diff --git a/start b/start
index 435df74..eeb965e 100755
--- a/start
+++ b/start
@@ -3,9 +3,8 @@
 THIS_DIR=$(dirname "$0")
 pushd "$THIS_DIR"
 
-npm run build:native
-npm run build:browser
+npm run build
 npm run serve &
-npm run dev:examples
+npm run dev:examples:web
 
 popd


[3/3] incubator-weex git commit: Merge branch 'dev' of https://github.com/erha19/incubator-weex into dev

Posted by gu...@apache.org.
Merge branch 'dev' of https://github.com/erha19/incubator-weex into dev


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

Branch: refs/heads/dev
Commit: db666a2f04d84b4f1ee46830daeb39e9b882879f
Parents: f3beb7d f8a3a23
Author: gurisxie <27...@qq.com>
Authored: Mon Sep 25 17:31:19 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Mon Sep 25 17:31:19 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/guide/set-up-env.md | 64 ++++++++++++++++++----------------
 doc/source/guide/set-up-env.md    | 58 ++++++++++++++++--------------
 start                             |  5 ++-
 3 files changed, 68 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/db666a2f/doc/source/guide/set-up-env.md
----------------------------------------------------------------------
diff --cc doc/source/guide/set-up-env.md
index 1cffbcd,c450233..af52bb3
--- a/doc/source/guide/set-up-env.md
+++ b/doc/source/guide/set-up-env.md
@@@ -71,23 -73,27 +73,27 @@@ You can modify this page in `src/index.
    </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>
+   .wrapper { align-items: center; margin-top: 120px; }
+   .title { padding-top:40px; padding-bottom: 40px; font-size: 48px; }
+   .logo { width: 360px; height: 156px; }
+   .desc { padding-top: 20px; color:#888; font-size: 24px;}
  </style>
+ 
+ <script>
+   export default {
+     data: {
+       logoUrl: 'http://img1.vued.vanthink.cn/vued08aa73a9ab65dcbd360ec54659ada97c.png',
+       target: 'World'
+     },
+     methods: {
+       update: function (e) {
+         this.target = 'Weex'
+         console.log('target:', this.target)
+       }
+     }
+   }
+ </script>
  ```
  
 -If you're curious to learn more about technical details, continue on to the next section. And don't forget to write code at [dotWe](https://dotwe.org) and preview at anytime.
 +If you're curious to learn more about technical details, continue on to the next section. And don't forget to write code at [dotWe](http://dotwe.org) and preview at anytime.


[2/3] incubator-weex git commit: * [doc] complete the set-up-env documentation

Posted by gu...@apache.org.
* [doc] complete the set-up-env documentation


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

Branch: refs/heads/dev
Commit: f8a3a23d506cb693a3780d9cca28b511a7b4dfdd
Parents: ab9ef1b
Author: erha19 <fa...@gmail.com>
Authored: Mon Sep 25 16:50:55 2017 +0800
Committer: erha19 <fa...@gmail.com>
Committed: Mon Sep 25 16:50:55 2017 +0800

----------------------------------------------------------------------
 doc/source/cn/guide/set-up-env.md | 64 ++++++++++++++++++----------------
 doc/source/guide/set-up-env.md    | 58 ++++++++++++++++--------------
 2 files changed, 66 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f8a3a23d/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
index 98d1b0d..48ae606 100644
--- a/doc/source/cn/guide/set-up-env.md
+++ b/doc/source/cn/guide/set-up-env.md
@@ -28,26 +28,26 @@ brew install node
 
 ```bash
 $ node -v
-v6.3.1
+v6.11.3
 $ npm -v
-3.10.3
+3.10.10
 ```
 
 通常,安装了 Node.js 环境,npm 包管理工具也随之安装了。因此,直接使用 npm 来安装 weex-toolkit。
 
 > npm 是一个 JavaScript 包管理工具,它可以让开发者轻松共享和重用代码。Weex 很多依赖来自社区,同样,Weex 也将很多工具发布到社区方便开发者使用。
 
-**注意: ** weex-toolkit 在 1.0.1 之后才支持初始化 Vue 项目,使用前请确认版本是否正确。
+**注意: ** 在`weex-toolkit`1.0.8版本后添加了npm5规范的`npm-shrinkwrap.json`用于锁定包依赖,故npm版本<5的用户需要通过`npm i npm@latest -g`更新一下npm的版本,使用前请确认版本是否正确。
 
 ```bash
 $ npm install -g weex-toolkit
-$ weex -v
-
-v1.0.3
-weex-builder : v0.2.4
-weex-previewer : v1.3.4
+$ weex -v //查看当前weex版本
 ```
 
+weex-toolkit也支持直接升级子依赖,如:
+```
+weex update weex-devtool@latest //@后标注版本后,latest表示最新
+```
 
 国内开发者可以考虑使用淘宝的 npm 镜像 —— [cnpm](https://npm.taobao.org/) 安装 weex-toolkit
 
@@ -87,42 +87,46 @@ $ weex create awesome-project
 
 - `build`: 源码打包,生成 JS Bundle
 - `dev`: webpack watch 模式,方便开发
-- `serve`: 开启静态服务器
-- `debug`: 调试模式
+- `serve`: 开启HotReload服务器,代码改动的将会实时同步到网页中
 
 我们先通过 `npm install` 安装项目依赖。之后运行根目录下的 `npm run dev & npm run serve` 开启  watch 模式和静态服务器。
 
 然后我们打开浏览器,进入 `http://localhost:8080/index.html` 即可看到 weex h5 页面。 
 
-初始化时已经为我们创建了基本的示例,我们可以在 `src/foo.vue` 中查看。
+初始化时已经为我们创建了基本的示例,我们可以在 `src/index.vue` 中查看。
 
 代码如下所示:
 
 ```html
 <template>
-  <div class="wrapper">
-    <text class="weex">Hello Weex !</text>
-    <text class="vue">Hello Vue !</text>
+  <div class="wrapper" @click="update">
+    <image :src="logoUrl" class="logo"></image>
+    <text class="title">Hello {{target}}</text>
+    <text class="desc">Now, let's use vue to build your weex app.</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>
+  .wrapper { align-items: center; margin-top: 120px; }
+  .title { padding-top:40px; padding-bottom: 40px; font-size: 48px; }
+  .logo { width: 360px; height: 156px; }
+  .desc { padding-top: 20px; color:#888; font-size: 24px;}
 </style>
+
+<script>
+  export default {
+    data: {
+      logoUrl: 'http://img1.vued.vanthink.cn/vued08aa73a9ab65dcbd360ec54659ada97c.png',
+      target: 'World'
+    },
+    methods: {
+      update: function (e) {
+        this.target = 'Weex'
+        console.log('target:', this.target)
+      }
+    }
+  }
+</script>
 ```
 
 关于 Weex 语法部分,你可以直接参考 [Vue Guide](https://vuejs.org/v2/guide/),这里不再重复介绍。如果您想了解有关技术详情的更多信息,请继续阅读下一节。并且不要忘记在 dotWe 写代码并随时预览。

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f8a3a23d/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
index 6a846b0..c450233 100644
--- a/doc/source/guide/set-up-env.md
+++ b/doc/source/guide/set-up-env.md
@@ -21,17 +21,18 @@ $ nvm use 6.10.0
 
 Node.js comes with npm, which lets you install the Weex CLI.
 
+**NOTE: ** After the `weex-toolkit`1.0.8 version, the npm-shrinkwrap.json` npm5 specification has been added to lock the package dependencies, so the npm version <5 needs to be updated by` npm i npm @latest -g` npm version, please confirm whether the version is correct before use.
+
 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
 ```
-
+You can use 'update@x.x.x' command to update specify version of weex-devtool,weex-previewer,weex-builder and weexpack
+```
+weex update weex-devtool@latest //latest sign means install latest version
+```
 **NOTE: ** If you get an error like "permission error", try installing with `sudo`.
 
 
@@ -57,37 +58,42 @@ We enter the awesome-project folder and install dependencies with the following
 npm install
 ```
 
-Then we run `npm run dev & npm run serve` in root directory to start watch mode and static server.
+Then we run `npm run serve` in root directory 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:
+You can modify this page in `src/index.vue`. The code is shown below:
 
 ```html
 <template>
-  <div class="wrapper">
-    <text class="weex">Hello Weex!</text>
-    <text class="vue">Hello Vue!</text>
+  <div class="wrapper" @click="update">
+    <image :src="logoUrl" class="logo"></image>
+    <text class="title">Hello {{target}}</text>
+    <text class="desc">Now, let's use vue to build your weex app.</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>
+  .wrapper { align-items: center; margin-top: 120px; }
+  .title { padding-top:40px; padding-bottom: 40px; font-size: 48px; }
+  .logo { width: 360px; height: 156px; }
+  .desc { padding-top: 20px; color:#888; font-size: 24px;}
 </style>
+
+<script>
+  export default {
+    data: {
+      logoUrl: 'http://img1.vued.vanthink.cn/vued08aa73a9ab65dcbd360ec54659ada97c.png',
+      target: 'World'
+    },
+    methods: {
+      update: function (e) {
+        this.target = 'Weex'
+        console.log('target:', this.target)
+      }
+    }
+  }
+</script>
 ```
 
 If you're curious to learn more about technical details, continue on to the next section. And don't forget to write code at [dotWe](https://dotwe.org) and preview at anytime.