You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ha...@apache.org on 2018/01/03 07:13:37 UTC

[06/22] incubator-weex git commit: * [jsfm] Adjust the file structure of js framework

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/ready.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/ready.source.js b/test/js-framework/case/basic/ready.source.js
new file mode 100644
index 0000000..08ee893
--- /dev/null
+++ b/test/js-framework/case/basic/ready.source.js
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/created', function(require, exports, module) {
+
+    ;
+    module.exports = {
+        data: function() {
+            return {
+                text: '',
+            }
+        },
+        ready: function() {
+            this.text = '1'
+        }
+    }
+
+
+    ;
+    module.exports.style = {}
+
+    ;
+    module.exports.template = {
+        "type": "container",
+        "children": [{
+            "type": "text",
+            "attr": {
+                "value": function() {
+                    return this.text
+                }
+            }
+        }]
+    }
+
+    ;
+})
+
+// require module
+bootstrap('@weex-component/created', {
+    "transformerVersion": "0.3.1"
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-kv.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-kv.output.js b/test/js-framework/case/basic/repeat-array-kv.output.js
new file mode 100644
index 0000000..4d4991a
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-kv.output.js
@@ -0,0 +1,22 @@
+{
+  type: 'container',
+  children: [{
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '0: Hello World1'
+    }
+  }, {
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '1: Hello World2'
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-kv.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-kv.source.js b/test/js-framework/case/basic/repeat-array-kv.source.js
new file mode 100644
index 0000000..21f26c7
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-kv.source.js
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/repeat-array-kv', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      titlelist: [
+        {text: 'Hello World1'},
+        {text: 'Hello World2'}
+      ]
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "repeat": {
+        expression: function() { return this.titlelist },
+        key: 'index',
+        value: 'title'
+      },
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": function () {return this.index + ': ' + this.title.text}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/repeat-array-kv')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-no-kv.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-no-kv.output.js b/test/js-framework/case/basic/repeat-array-no-kv.output.js
new file mode 100644
index 0000000..4d4991a
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-no-kv.output.js
@@ -0,0 +1,22 @@
+{
+  type: 'container',
+  children: [{
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '0: Hello World1'
+    }
+  }, {
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '1: Hello World2'
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-no-kv.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-no-kv.source.js b/test/js-framework/case/basic/repeat-array-no-kv.source.js
new file mode 100644
index 0000000..910bf04
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-no-kv.source.js
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/repeat-array-no-kv', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      titlelist: [
+        {text: 'Hello World1'},
+        {text: 'Hello World2'}
+      ]
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "repeat": {
+        expression: function() { return this.titlelist }
+      },
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": function () {return this.$index + ': ' + this.$value.text}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/repeat-array-no-kv')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-non-obj.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-non-obj.output.js b/test/js-framework/case/basic/repeat-array-non-obj.output.js
new file mode 100644
index 0000000..4d4991a
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-non-obj.output.js
@@ -0,0 +1,22 @@
+{
+  type: 'container',
+  children: [{
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '0: Hello World1'
+    }
+  }, {
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '1: Hello World2'
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-non-obj.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-non-obj.source.js b/test/js-framework/case/basic/repeat-array-non-obj.source.js
new file mode 100644
index 0000000..71de5d2
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-non-obj.source.js
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/repeat-array-non-obj', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      titlelist: [
+        'Hello World1',
+        'Hello World2'
+      ]
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "repeat": {
+        expression: function() { return this.titlelist },
+        value: 'title'
+      },
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": function () {return this.$index + ': ' + this.title}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/repeat-array-non-obj')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-v.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-v.output.js b/test/js-framework/case/basic/repeat-array-v.output.js
new file mode 100644
index 0000000..4d4991a
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-v.output.js
@@ -0,0 +1,22 @@
+{
+  type: 'container',
+  children: [{
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '0: Hello World1'
+    }
+  }, {
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '1: Hello World2'
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-array-v.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-array-v.source.js b/test/js-framework/case/basic/repeat-array-v.source.js
new file mode 100644
index 0000000..0fecb04
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-array-v.source.js
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/repeat-array-v', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      titlelist: [
+        {text: 'Hello World1'},
+        {text: 'Hello World2'}
+      ]
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "repeat": {
+        expression: function() { return this.titlelist },
+        value: 'title'
+      },
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": function () {return this.$index + ': ' + this.title.text}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/repeat-array-v')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-index.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-index.output.js b/test/js-framework/case/basic/repeat-index.output.js
new file mode 100644
index 0000000..4d4991a
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-index.output.js
@@ -0,0 +1,22 @@
+{
+  type: 'container',
+  children: [{
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '0: Hello World1'
+    }
+  }, {
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: '1: Hello World2'
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-index.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-index.source.js b/test/js-framework/case/basic/repeat-index.source.js
new file mode 100644
index 0000000..5bdc4ea
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-index.source.js
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/repeat-index', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      titlelist: [
+        {title: 'Hello World1'},
+        {title: 'Hello World2'}
+      ]
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "repeat": function () {return this.titlelist},
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": function () {return this.$index + ': ' + this.title}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/repeat-index')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-root.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-root.output.js b/test/js-framework/case/basic/repeat-root.output.js
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-root.output.js
@@ -0,0 +1 @@
+{}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-root.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-root.source.js b/test/js-framework/case/basic/repeat-root.source.js
new file mode 100644
index 0000000..ac79ae4
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-root.source.js
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/repeat-root', function (require, exports, module) {
+
+;module.exports = {
+  data: function () {return {
+    containers: [
+      {name: 'a'},
+      {name: 'b'}
+    ]
+  }}
+}
+
+;module.exports.template = {
+  "type": "container",
+  "repeat": function () {return this.containers},
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": "container"
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/repeat-root')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-watch.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-watch.output.js b/test/js-framework/case/basic/repeat-watch.output.js
new file mode 100644
index 0000000..1170f8b
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-watch.output.js
@@ -0,0 +1,46 @@
+{
+    "type": "list",
+    "children": [{
+        "type": "cell",
+        "attr": {
+            "append": "tree"
+        },
+        "children": [{
+            "type": "text",
+            "attr": {
+                "value": 1
+            },
+            "style": {
+                "height": 600
+            }
+        }]
+    }, {
+        "type": "cell",
+        "attr": {
+            "append": "tree"
+        },
+        "children": [{
+            "type": "text",
+            "attr": {
+                "value": 2
+            },
+            "style": {
+                "height": 600
+            }
+        }]
+    }, {
+        "type": "cell",
+        "attr": {
+            "append": "tree"
+        },
+        "children": [{
+            "type": "text",
+            "attr": {
+                "value": 3
+            },
+            "style": {
+                "height": 600
+            }
+        }]
+    }]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/repeat-watch.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/repeat-watch.source.js b/test/js-framework/case/basic/repeat-watch.source.js
new file mode 100644
index 0000000..0f989d8
--- /dev/null
+++ b/test/js-framework/case/basic/repeat-watch.source.js
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/04f1048c50eca3454bc70de93d3213d4', function(require, exports, module) {
+
+    ;
+    module.exports = {
+        data: function() {
+            return {
+                list: [{
+                    text: 1
+                }, {
+                    text: 2
+                }],
+                more: [{
+                    text: 3
+                }]
+            }
+        },
+        ready: function() {
+            for (var i = 0; i < this.more.length; i++) {
+                this.list.push(this.more[i]);
+            }
+        }
+    }
+
+
+    ;
+    module.exports.style = {}
+
+    ;
+    module.exports.template = {
+        "type": "list",
+        "children": [{
+            "type": "cell",
+            "append": "tree",
+            "repeat": function() {
+                return this.list
+            },
+            "children": [{
+                "type": "text",
+                "style": {
+                    "height": 600
+                },
+                "attr": {
+                    "value": function() {
+                        return this.text
+                    }
+                }
+            }]
+        }]
+    }
+
+    ;
+})
+
+// require module
+bootstrap('@weex-component/04f1048c50eca3454bc70de93d3213d4', {
+    "transformerVersion": "0.3.1"
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/require.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/require.output.js b/test/js-framework/case/basic/require.output.js
new file mode 100644
index 0000000..51c886e
--- /dev/null
+++ b/test/js-framework/case/basic/require.output.js
@@ -0,0 +1,9 @@
+{
+    type: 'container',
+    children: [{
+        type: 'text',
+        attr: {
+            value: 'Hello World'
+        }
+    }]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/require.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/require.source.js b/test/js-framework/case/basic/require.source.js
new file mode 100644
index 0000000..db1fed7
--- /dev/null
+++ b/test/js-framework/case/basic/require.source.js
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+var browserifyRequire=function r(e,n,o){function t(u,i){if(!n[u]){if(!e[u]){var a="function"==typeof browserifyRequire&&browserifyRequire;if(!i&&a)return a(u,!0);if(f)return f(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[u]={exports:{}};e[u][0].call(l.exports,function(r){var n=e[u][1][r];return t(n?n:r)},l,l.exports,r,e,n,o)}return n[u].exports}for(var f="function"==typeof browserifyRequire&&browserifyRequire,u=0;u<o.length;u++)t(o[u]);return t}({"1ba80324acff072bbb2b768911a5e4f1":[function(r,e,n){e.exports="Hello World"},{}]},{},[]);
+
+
+define('@weex-component/foo', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      text: ''
+    }},
+    created: function() {
+      this.text = browserifyRequire("1ba80324acff072bbb2b768911a5e4f1")
+    }
+  }
+
+
+;module.exports.style = {}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": function () {return this.text}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+bootstrap('@weex-component/foo', {"transformerVersion":"0.3.0"})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/reset-style.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/reset-style.output.js b/test/js-framework/case/basic/reset-style.output.js
new file mode 100644
index 0000000..ed6bbaf
--- /dev/null
+++ b/test/js-framework/case/basic/reset-style.output.js
@@ -0,0 +1,15 @@
+{
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": "Hello Weex"
+      },
+      "style": {
+        "fontSize": 40,
+        "color": ""
+      }
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/reset-style.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/reset-style.source.js b/test/js-framework/case/basic/reset-style.source.js
new file mode 100644
index 0000000..a96b891
--- /dev/null
+++ b/test/js-framework/case/basic/reset-style.source.js
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/reset-style', function (require, exports, module) {
+
+;
+  module.exports = {
+	  data: function () {return {
+	    className: 'highlight'
+	  }},
+    ready: function() {
+      this.className = 'normal'
+    }
+  }
+
+
+;module.exports.style = {
+  "normal": {
+    "fontSize": 40
+  },
+  "highlight": {
+    "fontSize": 60,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "classList": function () {return [this.className]},
+      "attr": {
+        "value": "Hello Weex"
+      }
+    }
+  ]
+}
+
+;})
+
+
+bootstrap('@weex-component/reset-style')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static1.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static1.output.js b/test/js-framework/case/basic/static1.output.js
new file mode 100644
index 0000000..e400730
--- /dev/null
+++ b/test/js-framework/case/basic/static1.output.js
@@ -0,0 +1,12 @@
+{
+  "type": "div",
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": "hello",
+        "static": ""
+      }
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static1.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static1.source.js b/test/js-framework/case/basic/static1.source.js
new file mode 100644
index 0000000..575ef66
--- /dev/null
+++ b/test/js-framework/case/basic/static1.source.js
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/static1', function (require, exports, module) {
+
+;
+  module.exports = {
+    ready: function() {
+	      this.x = 'world'
+	    },
+	    data: function () {return {
+	      x: 'hello'
+	    }}
+  }
+
+
+;module.exports.style = {
+}
+
+;module.exports.template = {
+  "type": "div",
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "static": "",
+        "value": function () {return this.x}
+      }
+    }
+  ]
+}
+
+;})
+
+
+bootstrap('@weex-component/static1')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static2.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static2.output.js b/test/js-framework/case/basic/static2.output.js
new file mode 100644
index 0000000..fd5ee57
--- /dev/null
+++ b/test/js-framework/case/basic/static2.output.js
@@ -0,0 +1,30 @@
+{
+  "type": "div",
+  "attr": {
+    "static": ""
+  },
+  "children": [
+    {
+      "type": "div",
+      "children": [
+        {
+          "type": "text",
+          "attr": {
+            "value": 1
+          }
+        }
+      ]
+    },
+    {
+      "type": "div",
+      "children": [
+        {
+          "type": "text",
+          "attr": {
+            "value": 2
+          }
+        }
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static2.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static2.source.js b/test/js-framework/case/basic/static2.source.js
new file mode 100644
index 0000000..93e1cf6
--- /dev/null
+++ b/test/js-framework/case/basic/static2.source.js
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/static2', function (require, exports, module) {
+
+;
+  module.exports = {
+    ready: function() {
+	      this.arr.$set(2, 3)
+	  },
+    data: function () {return {
+      arr: [1, 2]
+    }}
+  }
+
+
+;module.exports.style = {
+}
+
+;module.exports.template = {
+  "type": "div",
+  "attr": {
+    "static": ""
+  },
+  "children": [
+    {
+      "type": "div",
+      "repeat": {
+        "expression": function () {return this.arr},
+        "value": "x"
+      },
+      "children": [
+        {
+          "type": "text",
+          "attr": {
+            "value": function () {return this.x}
+          }
+        }
+      ]
+    }
+  ]
+}
+
+;})
+
+
+bootstrap('@weex-component/static2')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static3.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static3.output.js b/test/js-framework/case/basic/static3.output.js
new file mode 100644
index 0000000..73eaaab
--- /dev/null
+++ b/test/js-framework/case/basic/static3.output.js
@@ -0,0 +1,33 @@
+{
+  "type": "div",
+  "children": [
+    {
+      "type": "div",
+      "attr": {
+        "static": ""
+      },
+      "children": [
+        {
+          "type": "text",
+          "attr": {
+            "value": 1
+          }
+        }
+      ]
+    },
+    {
+      "type": "div",
+      "attr": {
+        "static": ""
+      },
+      "children": [
+        {
+          "type": "text",
+          "attr": {
+            "value": 2
+          }
+        }
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static3.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static3.source.js b/test/js-framework/case/basic/static3.source.js
new file mode 100644
index 0000000..9179ea7
--- /dev/null
+++ b/test/js-framework/case/basic/static3.source.js
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/static3', function (require, exports, module) {
+
+;
+  module.exports = {
+    ready: function() {
+	      this.arr.$set(2, 3)
+	    },
+	    data: function () {return {
+	      arr: [1, 2]
+	    }}
+  }
+
+
+;module.exports.style = {
+}
+
+;module.exports.template = {
+  "type": "div",
+  "children": [
+    {
+      "type": "div",
+      "repeat": {
+        "expression": function () {return this.arr},
+        "value": "x"
+      },
+      "attr": {
+        "static": ""
+      },
+      "children": [
+        {
+          "type": "text",
+          "attr": {
+            "value": function () {return this.x}
+          }
+        }
+      ]
+    }
+  ]
+}
+
+;})
+
+
+bootstrap('@weex-component/static3')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static4.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static4.output.js b/test/js-framework/case/basic/static4.output.js
new file mode 100644
index 0000000..a53e484
--- /dev/null
+++ b/test/js-framework/case/basic/static4.output.js
@@ -0,0 +1,35 @@
+{
+  "type": "div",
+  "attr": {
+    "static": ""
+  },
+  "children": [
+    {
+      "type": "div",
+      "children": [
+        {
+          "type": "div",
+          "children": [
+            {
+              "type": "text",
+              "attr": {
+                "value": 1
+              }
+            }
+          ]
+        },
+        {
+          "type": "div",
+          "children": [
+            {
+              "type": "text",
+              "attr": {
+                "value": 2
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/static4.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/static4.source.js b/test/js-framework/case/basic/static4.source.js
new file mode 100644
index 0000000..fe31bcc
--- /dev/null
+++ b/test/js-framework/case/basic/static4.source.js
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+function otherNameFunction () {
+  var module = {}
+  var exports = {}
+  module.exports = exports
+
+  ;module.exports.style = {}
+
+  ;module.exports.template = {
+    "type": "div",
+	  "children": [
+	    {
+	      "type": "div",
+	      "repeat": {
+	        "expression": function () {return this.outer},
+	        "value": "x"
+	      },
+	      "children": [
+	        {
+	          "type": "text",
+	          "attr": {
+	            "value": function () {return this.x}
+	          }
+	        }
+	      ]
+	    }
+	  ]
+  }
+
+  ;module.exports.data = function() {return {
+    outer: null
+  }}
+
+  return module.exports
+}
+
+// module
+
+define('@weex-component/static4', function (require, exports, module) {
+
+;
+  module.exports = {
+    "components": {
+      innertpl: otherNameFunction()
+    },
+    ready: function() {
+      this.arr.$set(2, 3)
+    },
+    data: function () {return {
+      arr: [1, 2]
+    }}
+  }
+
+
+;module.exports.style = {}
+
+;module.exports.template = {
+  "type": "div",
+  "attr": {
+    "static": ""
+  },
+  "children": [
+    {
+      "type": "innertpl",
+      "attr": {
+        "outer": function () {return this.arr}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/static4')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/subvm.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/subvm.output.js b/test/js-framework/case/basic/subvm.output.js
new file mode 100644
index 0000000..b7acaa4
--- /dev/null
+++ b/test/js-framework/case/basic/subvm.output.js
@@ -0,0 +1,20 @@
+{
+    "type": "container",
+    "children": [{
+        "type": "container",
+        "style": {
+            "marginTop": 10
+        },
+        "children": [{
+            "type": "text",
+            "attr": {
+                "value": "aa"
+            }
+        },{
+            "type": "text",
+            "attr": {
+                "value": "bb"
+            }
+        }]
+    }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/subvm.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/subvm.source.js b/test/js-framework/case/basic/subvm.source.js
new file mode 100644
index 0000000..1b054a5
--- /dev/null
+++ b/test/js-framework/case/basic/subvm.source.js
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/innertpl', function (require, exports, module) {
+
+;
+
+;module.exports.style = {}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": function () {return this.outerData.a}
+      }
+    },
+    {
+      "type": "text",
+      "attr": {
+        "value": function () {return this.outerData.b}
+      }
+    }
+  ]
+}
+
+;module.exports.created = function() {
+  this.outerData.a = 'aa'
+}
+
+;module.exports.methods = {
+  "ready": function() {
+    this.outerData.b = 'bb'
+  }
+}
+
+;})
+
+// module
+
+define('@weex-component/subvm', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      item: {a: 'a', b: 'b'},
+      className: 'fromOuter',
+      marginTop: 10
+    }}
+  }
+
+
+;module.exports.style = {}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "innertpl",
+      "classList": function() {
+        return this.className
+      },
+      "style": {
+        marginTop: function() {
+          return this.marginTop
+        }
+      },
+      "events": {
+          "click": "clicked"
+      },
+      "attr": {
+        "outerData": function () {return this.item}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/subvm')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/transformer1.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/transformer1.output.js b/test/js-framework/case/basic/transformer1.output.js
new file mode 100644
index 0000000..1372f91
--- /dev/null
+++ b/test/js-framework/case/basic/transformer1.output.js
@@ -0,0 +1,3 @@
+{
+    type: 'container'
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/basic/transformer1.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/basic/transformer1.source.js b/test/js-framework/case/basic/transformer1.source.js
new file mode 100644
index 0000000..7985e28
--- /dev/null
+++ b/test/js-framework/case/basic/transformer1.source.js
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/foo', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {
+      return {
+        x: 1
+      }
+    }
+  }
+
+
+;module.exports.style = {
+  "a": {
+    "fontSize": 12
+  }
+}
+
+;module.exports.template = {
+  "type": "container"
+}
+
+;})
+
+
+bootstrap('@weex-component/foo', {
+  'transformerVersion': '0.3.0'
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/append-root-event.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/append-root-event.output.js b/test/js-framework/case/complex/append-root-event.output.js
new file mode 100644
index 0000000..2a1b77c
--- /dev/null
+++ b/test/js-framework/case/complex/append-root-event.output.js
@@ -0,0 +1,13 @@
+{
+  type: 'div',
+  attr: {
+    append: "tree"
+  },
+  children: [{
+    type: 'text',
+    event: ['click'],
+    attr: {
+      value: 1
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/append-root-event.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/append-root-event.source.js b/test/js-framework/case/complex/append-root-event.source.js
new file mode 100644
index 0000000..49455e5
--- /dev/null
+++ b/test/js-framework/case/complex/append-root-event.source.js
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/append-root-event', function(require, exports, module) {
+
+    ;
+    module.exports = {
+        data: function() {
+            return {
+                x: 1
+            }
+        },
+        methods: {
+            update: function() {
+                this.x = 2
+            }
+        }
+    }
+
+
+    ;
+    module.exports.style = {}
+
+    ;
+    module.exports.template = {
+        "type": "div",
+        "append": "tree",
+        "children": [{
+            "type": "text",
+            "events": {
+                "click": "update"
+            },
+            "attr": {
+                "value": function() {
+                    return this.x
+                }
+            }
+        }]
+    }
+
+    ;
+})
+
+// require module
+
+bootstrap('@weex-component/append-root-event', {
+    "transformerVersion": "0.3.1"
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/click.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/click.output.js b/test/js-framework/case/complex/click.output.js
new file mode 100644
index 0000000..d19c92f
--- /dev/null
+++ b/test/js-framework/case/complex/click.output.js
@@ -0,0 +1,26 @@
+{
+  type: 'container',
+  event: ['click'],
+  children: [{
+    type: 'image',
+    attr: {
+      src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'
+    },
+    style: {
+      width: 200,
+      height: 200
+    }
+  }, {
+    type: 'text',
+    attr: {
+      value: '一个超赞的宝贝标题'
+    },
+    style: {
+      flex: 1,
+      color: '#ff0000',
+      fontSize: 48,
+      fontWeight: 'bold',
+      backgroundColor: '#eeeeee'
+    }
+  }]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/click.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/click.source.js b/test/js-framework/case/complex/click.source.js
new file mode 100644
index 0000000..039c98b
--- /dev/null
+++ b/test/js-framework/case/complex/click.source.js
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/click', function (require, exports, module) {
+
+;
+  module.exports = {
+    methods: {
+      gotoDetail: function () {
+        this.$openURL('https://item.taobao.com/item.htm?id=520421163634')
+      }
+    }
+  }
+
+
+;module.exports.style = {
+  "thumb": {
+    "width": 200,
+    "height": 200
+  },
+  "title": {
+    "flex": 1,
+    "color": "#ff0000",
+    "fontSize": 48,
+    "fontWeight": "bold",
+    "backgroundColor": "#eeeeee"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "events": {
+    "click": "gotoDetail"
+  },
+  "children": [
+    {
+      "type": "image",
+      "classList": [
+        "thumb"
+      ],
+      "attr": {
+        "src": "https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg"
+      }
+    },
+    {
+      "type": "text",
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": "一个超赞的宝贝标题"
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/click')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/component-append-tree.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/component-append-tree.output.js b/test/js-framework/case/complex/component-append-tree.output.js
new file mode 100644
index 0000000..6c036ec
--- /dev/null
+++ b/test/js-framework/case/complex/component-append-tree.output.js
@@ -0,0 +1,22 @@
+{
+  type: 'scroller',
+  children: [{
+    type: 'div',
+    attr: { "append": "node" },
+    children: [{
+      type: 'text',
+      attr: {
+        value: 'ready'
+      }
+    }]
+  }, {
+    type: 'div',
+    attr: { "append": "tree" },
+    children: [{
+      type: 'text',
+      attr: {
+        value: 'ready'
+      }
+    }]
+  }]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/component-append-tree.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/component-append-tree.source.js b/test/js-framework/case/complex/component-append-tree.source.js
new file mode 100644
index 0000000..7088eea
--- /dev/null
+++ b/test/js-framework/case/complex/component-append-tree.source.js
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define('@weex-component/sub', function(require, exports, module) {
+  
+      ;
+      module.exports = {
+          data: function() {
+              return {
+                  str: '-----'
+              }
+          },
+          ready: function() {
+              this.str = 'ready'
+              setTimeout(() => {
+                  this.str = 'timeout'
+              }, 100)
+          }
+      }
+  
+  
+      ;
+      module.exports.style = {}
+  
+      ;
+      module.exports.template = {
+          "type": "text",
+          "attr": {
+              "value": function() {
+                  return this.str
+              }
+          }
+      }
+  
+      ;
+  })
+  
+  // module
+  
+  define('@weex-component/ad164d40f42747f598b56eccfd0eae8e', function(require, exports, module) {
+  
+      ;
+  
+      ;
+      module.exports.style = {}
+  
+      ;
+      module.exports.template = {
+          "type": "scroller",
+          "children": [{
+              "type": "div",
+              "append": "node",
+              "children": [{
+                  "type": "sub"
+              }]
+          }, {
+              "type": "div",
+              "append": "tree",
+              "children": [{
+                  "type": "sub"
+              }]
+          }]
+      }
+  
+      ;
+  })
+  
+  // require module
+  bootstrap('@weex-component/ad164d40f42747f598b56eccfd0eae8e', {
+      "transformerVersion": "0.4.3"
+  })
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/computed.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/computed.output.js b/test/js-framework/case/complex/computed.output.js
new file mode 100644
index 0000000..8c5534d
--- /dev/null
+++ b/test/js-framework/case/complex/computed.output.js
@@ -0,0 +1,15 @@
+{
+  type: 'container',
+  event: ['click'],
+  children: [{
+    type: 'text',
+    attr: {
+      value: 3
+    },
+  }, {
+    type: 'text',
+    attr: {
+      value: 3
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/computed.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/computed.source.js b/test/js-framework/case/complex/computed.source.js
new file mode 100644
index 0000000..8d59ca3
--- /dev/null
+++ b/test/js-framework/case/complex/computed.source.js
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/computed', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {
+      return {x: 1, y: 2}
+    },
+    computed: {
+      n: function () {
+        return this.x + this.y
+      },
+      m: {
+        get: function () {
+          return this.x + this.y
+        },
+        set: function (v) {
+          this.y = v
+        }
+      }
+    },
+    methods: {
+      foo: function () {
+        this.m = 10
+      }
+    }
+  }
+
+
+;module.exports.template = {
+  "type": "container",
+  "events": {
+    "click": "foo"
+  },
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": function () {return this.n}
+      }
+    },
+    {
+      "type": "text",
+      "attr": {
+        "value": function () {return this.m}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/computed')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/if-refresh.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/if-refresh.output.js b/test/js-framework/case/complex/if-refresh.output.js
new file mode 100644
index 0000000..1372f91
--- /dev/null
+++ b/test/js-framework/case/complex/if-refresh.output.js
@@ -0,0 +1,3 @@
+{
+    type: 'container'
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/if-refresh.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/if-refresh.source.js b/test/js-framework/case/complex/if-refresh.source.js
new file mode 100644
index 0000000..3ebb80c
--- /dev/null
+++ b/test/js-framework/case/complex/if-refresh.source.js
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/if', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      showTitle: true,
+      title: 'Hello World'
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "shown": function () {return this.showTitle},
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": function () {return this.title}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/if')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/if-repeat-refresh.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/if-repeat-refresh.output.js b/test/js-framework/case/complex/if-repeat-refresh.output.js
new file mode 100644
index 0000000..d4831cc
--- /dev/null
+++ b/test/js-framework/case/complex/if-repeat-refresh.output.js
@@ -0,0 +1,22 @@
+{
+  type: 'container',
+  children: [{
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: 'Hello World2'
+    }
+  }, {
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      value: 'Hello World3'
+    }
+  }]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/if-repeat-refresh.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/if-repeat-refresh.source.js b/test/js-framework/case/complex/if-repeat-refresh.source.js
new file mode 100644
index 0000000..aa62931
--- /dev/null
+++ b/test/js-framework/case/complex/if-repeat-refresh.source.js
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/if-repeat', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      titlelist: [
+        {showTitle: true, title: 'Hello World1'},
+        {showTitle: false, title: 'Hello World2'}
+      ]
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "repeat": function () {return this.titlelist},
+      "shown": function () {return this.showTitle},
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "value": function () {return this.title}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/if-repeat')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/inline-click.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/inline-click.output.js b/test/js-framework/case/complex/inline-click.output.js
new file mode 100644
index 0000000..bf3208e
--- /dev/null
+++ b/test/js-framework/case/complex/inline-click.output.js
@@ -0,0 +1,14 @@
+{
+ "type": "div",
+ "children": [
+  {
+   "type": "text",
+   "attr": {
+    "value": "Hello World1"
+   },
+   "event": [
+    "click"
+   ]
+  }
+ ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/inline-click.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/inline-click.source.js b/test/js-framework/case/complex/inline-click.source.js
new file mode 100644
index 0000000..e447c9e
--- /dev/null
+++ b/test/js-framework/case/complex/inline-click.source.js
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/test', function (require, exports, module) {
+
+;
+module.exports = {
+    data: function () {return {
+        text: 'Hello World1'
+    }},
+    methods: {
+        clicked: function(text, e) {
+            this.text = text
+        }
+    }
+}
+
+
+;module.exports.style = {}
+
+;module.exports.template = {
+  "type": "div",
+  "children": [
+    {
+      "type": "text",
+      "events": {
+        "click": function ($event) {this.clicked('Hello World2', $event)}
+      },
+      "attr": {
+        "value": function () {return this.text}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+bootstrap('@weex-component/test', {"transformerVersion":"0.3.0"})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/input-binding.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/input-binding.output.js b/test/js-framework/case/complex/input-binding.output.js
new file mode 100644
index 0000000..30b9957
--- /dev/null
+++ b/test/js-framework/case/complex/input-binding.output.js
@@ -0,0 +1,12 @@
+{
+  "children": [
+    {
+      "attr": {
+        "value": "abcde"
+      },
+      "event": ["change"],
+      "type": "input"
+    }
+  ],
+  "type": "div"
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/input-binding.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/input-binding.source.js b/test/js-framework/case/complex/input-binding.source.js
new file mode 100644
index 0000000..ae96760
--- /dev/null
+++ b/test/js-framework/case/complex/input-binding.source.js
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/d6b20355da35c77d07f0a11ec5256f42', function(require, exports, module) {
+
+    ;
+    module.exports = {
+        data: function() {
+            return {
+                x: 'abcde',
+                changes: []
+            }
+        },
+        methods: {
+            change: function(e) {
+                var value = e.target.attr.value
+                this.x = value
+                this.changes.push(value)
+            }
+        }
+    }
+
+
+    ;
+    module.exports.style = {}
+
+    ;
+    module.exports.template = {
+        "type": "div",
+        "children": [{
+            "type": "input",
+            "attr": {
+                "value": function() {
+                    return this.x
+                }
+            },
+            "events": {
+                "change": "change"
+            }
+        }, {
+            "type": "text",
+            "repeat": {
+                "expression": function() {
+                    return this.changes
+                },
+                "key": "k",
+                "value": "v"
+            },
+            "attr": {
+                "value": function() {
+                    return (this.k + 1) + ' - ' + (this.v)
+                }
+            }
+        }]
+    }
+
+    ;
+})
+
+// require module
+bootstrap('@weex-component/d6b20355da35c77d07f0a11ec5256f42', {
+    "transformerVersion": "0.3.1"
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/refresh2.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/refresh2.output.js b/test/js-framework/case/complex/refresh2.output.js
new file mode 100644
index 0000000..823fda9
--- /dev/null
+++ b/test/js-framework/case/complex/refresh2.output.js
@@ -0,0 +1,20 @@
+{
+    "type": "container",
+    "children": [{
+        "type": "container",
+        "children": [{
+            "type": "text",
+            "attr": {
+                "value": "bar1"
+            }
+        }, {
+            "type": "container",
+            "children": [{
+                "type": "text",
+                "attr": {
+                    "value": "bar2-refresh"
+                }
+            }]
+        }]
+    }]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/refresh2.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/refresh2.source.js b/test/js-framework/case/complex/refresh2.source.js
new file mode 100644
index 0000000..6fa770c
--- /dev/null
+++ b/test/js-framework/case/complex/refresh2.source.js
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define('@weex-component/bar1', function(require, exports, module) {;;
+  module.exports.template = {
+    type: 'container',
+    children: [{
+      type: 'text',
+      attr: {
+        value: 'bar1'
+      }
+    }, {
+      type: 'bar2',
+      id: 'bar2',
+      component: true
+    }]
+  }
+
+  ;
+  module.exports.methods = {
+    ready: function(isRefresh) {
+      if (isRefresh) {
+        this.$vm('bar2').ready(true)
+      }
+    }
+  }
+
+})
+
+define('@weex-component/bar2', function(require, exports, module) {;;
+  module.exports.template = {
+    type: 'container',
+    children: [{
+      type: 'text',
+      attr: {
+        value: function() {
+          return this.text
+        }
+      }
+    }]
+  }
+
+  ;
+  module.exports.data = function() {
+    return {
+      text: 'bar2'
+    }
+  }
+
+  ;
+  module.exports.methods = {
+    ready: function(isRefresh) {
+      if (isRefresh) {
+        this.text = 'bar2-refresh'
+      }
+    }
+  }
+
+
+})
+
+define('@weex-component/foo', function(require, exports, module) {
+
+  ;
+  module.exports.style = {}
+
+  ;
+  module.exports.template = {
+    type: 'container',
+    children: [{
+      type: 'bar1',
+      shown: function() {
+        return this.showbar1
+      },
+      id: 'bar1',
+      component: true
+    }]
+  }
+
+  ;
+  module.exports.data = function() {
+    return {
+      showbar1: false,
+      ext: {
+        showbar1: false
+      }
+    }
+  }
+
+  ;module.exports.methods = {
+    refreshData: function(data) {
+      for (var key in data) {
+        this[key] = data[key]
+      }
+      this.ready(true)
+    },
+    ready: function(isRefresh) {
+      var self = this
+      this.showbar1 = this.ext.showbar1
+
+      if (isRefresh) {
+        if (this.showbar1) {
+          this.$renderThen(() => {
+            this.$vm('bar1').$on('hook:ready', function() {
+              self.$vm('bar1').ready(true)
+            })
+          })
+        }
+      }
+    }
+  }
+
+})
+
+// require module
+
+bootstrap('@weex-component/foo')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/repeat-track-by.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/repeat-track-by.output.js b/test/js-framework/case/complex/repeat-track-by.output.js
new file mode 100644
index 0000000..7e64c10
--- /dev/null
+++ b/test/js-framework/case/complex/repeat-track-by.output.js
@@ -0,0 +1,24 @@
+{
+  type: 'container',
+  children: [{
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      trackBy: 'text',
+      value: '0: Hello World2'
+    }
+  }, {
+    type: 'text',
+    style: {
+      color: '#FF0000',
+      fontSize: 26
+    },
+    attr: {
+      trackBy: 'text',
+      value: '1: Hello World1'
+    }
+  }]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/repeat-track-by.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/repeat-track-by.source.js b/test/js-framework/case/complex/repeat-track-by.source.js
new file mode 100644
index 0000000..127acb0
--- /dev/null
+++ b/test/js-framework/case/complex/repeat-track-by.source.js
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/repeat-track-by', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {return {
+      titlelist: [
+        {text: 'Hello World1'},
+        {text: 'Hello World2'}
+      ]
+    }}
+  }
+
+
+;module.exports.style = {
+  "title": {
+    "fontSize": 26,
+    "color": "#FF0000"
+  }
+}
+
+;module.exports.template = {
+  "type": "container",
+  "children": [
+    {
+      "type": "text",
+      "repeat": {
+        expression: function() { return this.titlelist },
+        key: 'index',
+        value: 'title'
+      },
+      "classList": [
+        "title"
+      ],
+      "attr": {
+        "trackBy": "text",
+        "value": function () {return this.index + ': ' + this.title.text}
+      }
+    }
+  ]
+}
+
+;})
+
+// require module
+
+bootstrap('@weex-component/repeat-track-by')

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/transformer2.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/transformer2.output.js b/test/js-framework/case/complex/transformer2.output.js
new file mode 100644
index 0000000..1372f91
--- /dev/null
+++ b/test/js-framework/case/complex/transformer2.output.js
@@ -0,0 +1,3 @@
+{
+    type: 'container'
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/transformer2.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/transformer2.source.js b/test/js-framework/case/complex/transformer2.source.js
new file mode 100644
index 0000000..af31348
--- /dev/null
+++ b/test/js-framework/case/complex/transformer2.source.js
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/foo', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {
+      return {
+        x: 1
+      }
+    }
+  }
+
+
+;module.exports.style = {
+  "a": {
+    "fontSize": 12
+  }
+}
+
+;module.exports.template = {
+  "type": "container"
+}
+
+;})
+
+
+bootstrap('@weex-component/foo', {
+  'transformerVersion': '0.0.1'
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/transformer3.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/transformer3.output.js b/test/js-framework/case/complex/transformer3.output.js
new file mode 100644
index 0000000..1372f91
--- /dev/null
+++ b/test/js-framework/case/complex/transformer3.output.js
@@ -0,0 +1,3 @@
+{
+    type: 'container'
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/complex/transformer3.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/complex/transformer3.source.js b/test/js-framework/case/complex/transformer3.source.js
new file mode 100644
index 0000000..2ca15a3
--- /dev/null
+++ b/test/js-framework/case/complex/transformer3.source.js
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define('@weex-component/foo', function (require, exports, module) {
+
+;
+  module.exports = {
+    data: function () {
+      return {
+        x: 1
+      }
+    }
+  }
+
+
+;module.exports.style = {
+  "a": {
+    "fontSize": 12
+  }
+}
+
+;module.exports.template = {
+  "type": "container"
+}
+
+;})
+
+
+bootstrap('@weex-component/foo', {
+  'transformerVersion': '9.9.9'
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/multi/clear-dep-target-error.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/multi/clear-dep-target-error.source.js b/test/js-framework/case/multi/clear-dep-target-error.source.js
new file mode 100644
index 0000000..0001d1c
--- /dev/null
+++ b/test/js-framework/case/multi/clear-dep-target-error.source.js
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define('@weex-component/DepTargetError', function(require, exports, module) {
+
+  ;module.exports = {
+    data: function () {return {
+      a: {}
+    }}
+  }
+
+
+  ;module.exports.style = {}
+
+  ;module.exports.template = {
+	  "type": "div",
+	  "children": [
+	    {
+	      "type": "text",
+	      "attr": {
+	        "value": function () { return this.a.x.y }
+	      }
+	    }
+	  ]
+  }
+
+})
+
+bootstrap('@weex-component/DepTargetError', { "transformerVersion": "0.3.1" })

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/multi/clear-dep-target-fine.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/multi/clear-dep-target-fine.output.js b/test/js-framework/case/multi/clear-dep-target-fine.output.js
new file mode 100644
index 0000000..e129423
--- /dev/null
+++ b/test/js-framework/case/multi/clear-dep-target-fine.output.js
@@ -0,0 +1,11 @@
+{
+  "type": "div",
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": "correct"
+      }
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/multi/clear-dep-target-fine.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/multi/clear-dep-target-fine.source.js b/test/js-framework/case/multi/clear-dep-target-fine.source.js
new file mode 100644
index 0000000..fd7c7a2
--- /dev/null
+++ b/test/js-framework/case/multi/clear-dep-target-fine.source.js
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define('@weex-component/DepTargetFine', function(require, exports, module) {
+
+  ;module.exports = {
+    data: function () {return {
+      lists: []
+    }},
+    created: function() {
+      this.lists.$set(0, 'correct')
+    }
+  }
+
+
+  ;module.exports.style = {}
+
+  ;module.exports.template = {
+	  "type": "div",
+	  "children": [
+	    {
+	      "type": "text",
+	      "attr": {
+	        "value": function () { return this.lists[0] }
+	      }
+	    }
+	  ]
+  }
+
+})
+
+bootstrap('@weex-component/DepTargetFine', { "transformerVersion": "0.3.1" })

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/multi/clear-moduleA.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/multi/clear-moduleA.output.js b/test/js-framework/case/multi/clear-moduleA.output.js
new file mode 100644
index 0000000..5e7eac3
--- /dev/null
+++ b/test/js-framework/case/multi/clear-moduleA.output.js
@@ -0,0 +1,12 @@
+{
+  "type": "div",
+  "children": [
+    {
+      "type": "text",
+      "event": ["click"],
+      "attr": {
+        "value": "sample"
+      }
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/multi/clear-moduleA.source.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/multi/clear-moduleA.source.js b/test/js-framework/case/multi/clear-moduleA.source.js
new file mode 100644
index 0000000..190b36f
--- /dev/null
+++ b/test/js-framework/case/multi/clear-moduleA.source.js
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define('@weex-component/moduleA', function(require, exports, module) {
+
+  define('sample', function(require, exports, module) {
+    module.exports = { name: 'sample' }
+  })
+
+  ;module.exports = {
+    data: {
+      text: ''
+    },
+    methods: {
+      update: function() {
+        var outer = require('sample')
+        this.text = outer ? outer.name : 'nothing'
+      }
+    }
+  }
+
+
+  ;module.exports.style = {}
+
+  ;module.exports.template = {
+	  "type": "div",
+	  "children": [
+	    {
+	      "type": "text",
+    	  "events": {
+    	    "click": "update"
+    	  },
+	      "attr": {
+	        "value": function() { return this.text }
+	      }
+	    }
+	  ]
+  }
+
+})
+
+// require module
+bootstrap('@weex-component/moduleA', {
+    "transformerVersion": "0.3.1"
+})

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/test/js-framework/case/multi/clear-moduleB.output.js
----------------------------------------------------------------------
diff --git a/test/js-framework/case/multi/clear-moduleB.output.js b/test/js-framework/case/multi/clear-moduleB.output.js
new file mode 100644
index 0000000..c31de94
--- /dev/null
+++ b/test/js-framework/case/multi/clear-moduleB.output.js
@@ -0,0 +1,11 @@
+{
+  "type": "div",
+  "children": [
+    {
+      "type": "text",
+      "attr": {
+        "value": "nothing"
+      }
+    }
+  ]
+}