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:46 UTC
[15/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/html5/test/case/complex/if-repeat-refresh.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/if-repeat-refresh.source.js b/html5/test/case/complex/if-repeat-refresh.source.js
deleted file mode 100644
index aa62931..0000000
--- a/html5/test/case/complex/if-repeat-refresh.source.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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/html5/test/case/complex/inline-click.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/inline-click.output.js b/html5/test/case/complex/inline-click.output.js
deleted file mode 100644
index bf3208e..0000000
--- a/html5/test/case/complex/inline-click.output.js
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "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/html5/test/case/complex/inline-click.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/inline-click.source.js b/html5/test/case/complex/inline-click.source.js
deleted file mode 100644
index e447c9e..0000000
--- a/html5/test/case/complex/inline-click.source.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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/html5/test/case/complex/input-binding.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/input-binding.output.js b/html5/test/case/complex/input-binding.output.js
deleted file mode 100644
index 30b9957..0000000
--- a/html5/test/case/complex/input-binding.output.js
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "children": [
- {
- "attr": {
- "value": "abcde"
- },
- "event": ["change"],
- "type": "input"
- }
- ],
- "type": "div"
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/complex/input-binding.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/input-binding.source.js b/html5/test/case/complex/input-binding.source.js
deleted file mode 100644
index ae96760..0000000
--- a/html5/test/case/complex/input-binding.source.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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/html5/test/case/complex/refresh2.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/refresh2.output.js b/html5/test/case/complex/refresh2.output.js
deleted file mode 100644
index 823fda9..0000000
--- a/html5/test/case/complex/refresh2.output.js
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "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/html5/test/case/complex/refresh2.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/refresh2.source.js b/html5/test/case/complex/refresh2.source.js
deleted file mode 100644
index 6fa770c..0000000
--- a/html5/test/case/complex/refresh2.source.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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/html5/test/case/complex/repeat-track-by.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/repeat-track-by.output.js b/html5/test/case/complex/repeat-track-by.output.js
deleted file mode 100644
index 7e64c10..0000000
--- a/html5/test/case/complex/repeat-track-by.output.js
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- 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/html5/test/case/complex/repeat-track-by.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/repeat-track-by.source.js b/html5/test/case/complex/repeat-track-by.source.js
deleted file mode 100644
index 127acb0..0000000
--- a/html5/test/case/complex/repeat-track-by.source.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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/html5/test/case/complex/transformer2.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/transformer2.output.js b/html5/test/case/complex/transformer2.output.js
deleted file mode 100644
index 1372f91..0000000
--- a/html5/test/case/complex/transformer2.output.js
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- type: 'container'
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/complex/transformer2.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/transformer2.source.js b/html5/test/case/complex/transformer2.source.js
deleted file mode 100644
index af31348..0000000
--- a/html5/test/case/complex/transformer2.source.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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/html5/test/case/complex/transformer3.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/transformer3.output.js b/html5/test/case/complex/transformer3.output.js
deleted file mode 100644
index 1372f91..0000000
--- a/html5/test/case/complex/transformer3.output.js
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- type: 'container'
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/complex/transformer3.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/complex/transformer3.source.js b/html5/test/case/complex/transformer3.source.js
deleted file mode 100644
index 2ca15a3..0000000
--- a/html5/test/case/complex/transformer3.source.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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/html5/test/case/multi/clear-dep-target-error.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/multi/clear-dep-target-error.source.js b/html5/test/case/multi/clear-dep-target-error.source.js
deleted file mode 100644
index 0001d1c..0000000
--- a/html5/test/case/multi/clear-dep-target-error.source.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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/html5/test/case/multi/clear-dep-target-fine.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/multi/clear-dep-target-fine.output.js b/html5/test/case/multi/clear-dep-target-fine.output.js
deleted file mode 100644
index e129423..0000000
--- a/html5/test/case/multi/clear-dep-target-fine.output.js
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "type": "div",
- "children": [
- {
- "type": "text",
- "attr": {
- "value": "correct"
- }
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/multi/clear-dep-target-fine.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/multi/clear-dep-target-fine.source.js b/html5/test/case/multi/clear-dep-target-fine.source.js
deleted file mode 100644
index fd7c7a2..0000000
--- a/html5/test/case/multi/clear-dep-target-fine.source.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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/html5/test/case/multi/clear-moduleA.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/multi/clear-moduleA.output.js b/html5/test/case/multi/clear-moduleA.output.js
deleted file mode 100644
index 5e7eac3..0000000
--- a/html5/test/case/multi/clear-moduleA.output.js
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "type": "div",
- "children": [
- {
- "type": "text",
- "event": ["click"],
- "attr": {
- "value": "sample"
- }
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/multi/clear-moduleA.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/multi/clear-moduleA.source.js b/html5/test/case/multi/clear-moduleA.source.js
deleted file mode 100644
index 190b36f..0000000
--- a/html5/test/case/multi/clear-moduleA.source.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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/html5/test/case/multi/clear-moduleB.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/multi/clear-moduleB.output.js b/html5/test/case/multi/clear-moduleB.output.js
deleted file mode 100644
index c31de94..0000000
--- a/html5/test/case/multi/clear-moduleB.output.js
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "type": "div",
- "children": [
- {
- "type": "text",
- "attr": {
- "value": "nothing"
- }
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/multi/clear-moduleB.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/multi/clear-moduleB.source.js b/html5/test/case/multi/clear-moduleB.source.js
deleted file mode 100644
index c6338fd..0000000
--- a/html5/test/case/multi/clear-moduleB.source.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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/moduleB', function(require, exports, module) {
-
- ;module.exports = {
- data: {
- text: ''
- },
- created: function() {
- var smp = require('sample')
- this.text = smp ? smp.name : 'nothing'
- }
- }
-
- ;module.exports.style = {}
-
- ;module.exports.template = {
- "type": "div",
- "children": [
- {
- "type": "text",
- "attr": {
- "value": function() { return this.text }
- }
- }
- ]
- }
-
-})
-
-// require module
-bootstrap('@weex-component/moduleB', {
- "transformerVersion": "0.3.1"
-})
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/prepare.js
----------------------------------------------------------------------
diff --git a/html5/test/case/prepare.js b/html5/test/case/prepare.js
deleted file mode 100644
index d787c42..0000000
--- a/html5/test/case/prepare.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.
- */
-import fs from 'fs'
-import path from 'path'
-
-// load test driver
-import {
- Runtime,
- Instance
-} from 'weex-vdom-tester'
-
-// load env
-import shared from '../../shared'
-import { Document, Element, Comment } from '../../runtime/vdom'
-import Listener from '../../runtime/bridge/Listener'
-import { TaskCenter, init } from '../../runtime/bridge/TaskCenter'
-
-// load framework
-import * as defaultFramework from '../../frameworks/legacy'
-import { subversion } from '../../../package.json'
-
-shared.setNativeConsole()
-
-// mock config & global APIs
-global.callNativeHandler = function () {}
-
-// init special API called `callAddElement()`
-// which is supported temporarily in native render
-global.callAddElement = function (id, ref, json, index) {
- return callNativeHandler(id, [{ module: 'dom', method: 'addElement', args: [ref, json, index] }])
-}
-
-init()
-
-// create test driver runtime
-export function createRuntime () {
- const config = {
- Document, Element, Comment, Listener,
- TaskCenter,
- sendTasks (...args) {
- return callNativeHandler(...args)
- }
- }
-
- Document.Listener = Listener
- Document.handler = config.sendTasks
-
- defaultFramework.init(config)
-
- Object.assign(global, {
- frameworkVersion: subversion.native,
- transformerVersion: subversion.transformer
- })
-
- return new Runtime(defaultFramework)
-}
-
-// create framework instance
-export function createApp (runtime) {
- return new Instance(runtime)
-}
-
-// read source code from file
-export function getCode (filePath) {
- const absolutPath = path.join(__dirname, filePath)
- return fs.readFileSync(absolutPath, 'utf8')
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/signals/modal.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/signals/modal.output.js b/html5/test/case/signals/modal.output.js
deleted file mode 100644
index f645aa2..0000000
--- a/html5/test/case/signals/modal.output.js
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- type: 'div',
- children: [{
- type: 'text',
- attr: {
- value: 'foo'
- }
- }]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/signals/modal.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/signals/modal.source.js b/html5/test/case/signals/modal.source.js
deleted file mode 100644
index bdef1b8..0000000
--- a/html5/test/case/signals/modal.source.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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/modal', function (require, exports, module) {
-
-;
- var modal = require('@weex-module/modal')
- module.exports = {
- data: function () {
- return {
- x: 'foo'
- }
- },
- created: function () {
- var message = 'Here is a message for you!'
- var okTitle = 'OK'
- modal.alert({
- message: message,
- okTitle: okTitle
- }, function() {
- this.x = 'bar'
- }.bind(this))
- }
- }
-
-
-;module.exports.template = {
- "type": "div",
- "children": [
- {
- "type": "text",
- "attr": {
- "value": function () {
- return this.x
- }
- }
- }
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/modal')