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:48 UTC
[17/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/runtime/vdom/operation.js
----------------------------------------------------------------------
diff --git a/html5/runtime/vdom/operation.js b/html5/runtime/vdom/operation.js
deleted file mode 100644
index 69a64e1..0000000
--- a/html5/runtime/vdom/operation.js
+++ /dev/null
@@ -1,272 +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.
- */
-
-const docMap = {}
-
-/**
- * Add a document object into docMap.
- * @param {string} id
- * @param {object} document
- */
-export function addDoc (id, doc) {
- if (id) {
- docMap[id] = doc
- }
-}
-
-/**
- * Get the document object by id.
- * @param {string} id
- */
-export function getDoc (id) {
- return docMap[id]
-}
-
-/**
- * Remove the document from docMap by id.
- * @param {string} id
- */
-export function removeDoc (id) {
- delete docMap[id]
-}
-
-/**
- * @deprecated
- * Get listener by document id.
- * @param {string} id
- * @return {object} listener
- */
-export function getListener (id) {
- const doc = docMap[id]
- if (doc && doc.listener) {
- return doc.listener
- }
- return null
-}
-
-/**
- * Get TaskCenter instance by id.
- * @param {string} id
- * @return {object} TaskCenter
- */
-export function getTaskCenter (id) {
- const doc = docMap[id]
- if (doc && doc.taskCenter) {
- return doc.taskCenter
- }
- return null
-}
-
-/**
- * Append body node to documentElement.
- * @param {object} document
- * @param {object} node
- * @param {object} before
- */
-export function appendBody (doc, node, before) {
- const { documentElement } = doc
-
- if (documentElement.pureChildren.length > 0 || node.parentNode) {
- return
- }
- const children = documentElement.children
- const beforeIndex = children.indexOf(before)
- if (beforeIndex < 0) {
- children.push(node)
- }
- else {
- children.splice(beforeIndex, 0, node)
- }
-
- if (node.nodeType === 1) {
- if (node.role === 'body') {
- node.docId = doc.id
- node.ownerDocument = doc
- node.parentNode = documentElement
- linkParent(node, documentElement)
- }
- else {
- node.children.forEach(child => {
- child.parentNode = node
- })
- setBody(doc, node)
- node.docId = doc.id
- node.ownerDocument = doc
- linkParent(node, documentElement)
- delete doc.nodeMap[node.nodeId]
- }
- documentElement.pureChildren.push(node)
- sendBody(doc, node)
- }
- else {
- node.parentNode = documentElement
- doc.nodeMap[node.ref] = node
- }
-}
-
-function sendBody (doc, node) {
- const body = node.toJSON()
- if (doc && doc.taskCenter && typeof doc.taskCenter.send === 'function') {
- doc.taskCenter.send('dom', { action: 'createBody' }, [body])
- }
-}
-
-/**
- * Set up body node.
- * @param {object} document
- * @param {object} element
- */
-export function setBody (doc, el) {
- el.role = 'body'
- el.depth = 1
- delete doc.nodeMap[el.nodeId]
- el.ref = '_root'
- doc.nodeMap._root = el
- doc.body = el
-}
-
-/**
- * Establish the connection between parent and child node.
- * @param {object} child node
- * @param {object} parent node
- */
-export function linkParent (node, parent) {
- node.parentNode = parent
- if (parent.docId) {
- node.docId = parent.docId
- node.ownerDocument = parent.ownerDocument
- node.ownerDocument.nodeMap[node.nodeId] = node
- node.depth = parent.depth + 1
- }
- node.children.forEach(child => {
- linkParent(child, node)
- })
-}
-
-/**
- * Get the next sibling element.
- * @param {object} node
- */
-export function nextElement (node) {
- while (node) {
- if (node.nodeType === 1) {
- return node
- }
- node = node.nextSibling
- }
-}
-
-/**
- * Get the previous sibling element.
- * @param {object} node
- */
-export function previousElement (node) {
- while (node) {
- if (node.nodeType === 1) {
- return node
- }
- node = node.previousSibling
- }
-}
-
-/**
- * Insert a node into list at the specified index.
- * @param {object} target node
- * @param {array} list
- * @param {number} newIndex
- * @param {boolean} changeSibling
- * @return {number} newIndex
- */
-export function insertIndex (target, list, newIndex, changeSibling) {
- /* istanbul ignore next */
- if (newIndex < 0) {
- newIndex = 0
- }
- const before = list[newIndex - 1]
- const after = list[newIndex]
- list.splice(newIndex, 0, target)
- if (changeSibling) {
- before && (before.nextSibling = target)
- target.previousSibling = before
- target.nextSibling = after
- after && (after.previousSibling = target)
- }
- return newIndex
-}
-
-/**
- * Move the node to a new index in list.
- * @param {object} target node
- * @param {array} list
- * @param {number} newIndex
- * @param {boolean} changeSibling
- * @return {number} newIndex
- */
-export function moveIndex (target, list, newIndex, changeSibling) {
- const index = list.indexOf(target)
- /* istanbul ignore next */
- if (index < 0) {
- return -1
- }
- if (changeSibling) {
- const before = list[index - 1]
- const after = list[index + 1]
- before && (before.nextSibling = after)
- after && (after.previousSibling = before)
- }
- list.splice(index, 1)
- let newIndexAfter = newIndex
- if (index <= newIndex) {
- newIndexAfter = newIndex - 1
- }
- const beforeNew = list[newIndexAfter - 1]
- const afterNew = list[newIndexAfter]
- list.splice(newIndexAfter, 0, target)
- if (changeSibling) {
- beforeNew && (beforeNew.nextSibling = target)
- target.previousSibling = beforeNew
- target.nextSibling = afterNew
- afterNew && (afterNew.previousSibling = target)
- }
- if (index === newIndexAfter) {
- return -1
- }
- return newIndex
-}
-
-/**
- * Remove the node from list.
- * @param {object} target node
- * @param {array} list
- * @param {boolean} changeSibling
- */
-export function removeIndex (target, list, changeSibling) {
- const index = list.indexOf(target)
- /* istanbul ignore next */
- if (index < 0) {
- return
- }
- if (changeSibling) {
- const before = list[index - 1]
- const after = list[index + 1]
- before && (before.nextSibling = after)
- after && (after.previousSibling = before)
- }
- list.splice(index, 1)
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/services/amd/index.js
----------------------------------------------------------------------
diff --git a/html5/services/amd/index.js b/html5/services/amd/index.js
deleted file mode 100644
index 3a7a491..0000000
--- a/html5/services/amd/index.js
+++ /dev/null
@@ -1,105 +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.
- */
-
-/**
- * @fileOverview
- * A simple implementation of AMD for weex.
- */
-
-/**
- * amd modules (<id, module> pair)
- * - id : instance id.
- * - module: {
- * name: module name
- * , factory: module's factory function
- * , cached: cached module,
- * , deps: module's dependencies, always be [] under most circumstances.
- * }
- */
-const modules = {}
-
-const amdService = {
-
- // create a amd service.
- create: (id, env, config) => {
- if (!env.framework.match(/Vue/i)) {
- return
- }
-
- const mod = {}
- modules[id] = mod
- const amdObject = {
-
- /**
- * define a module.
- * @param {String} name: module name.
- * @param {Array} deps: dependencies. Always be empty array.
- * @param {function} factory: factory function.
- */
- define (name, deps, factory) {
- if (mod[name]) {
- console.warn(`[amdService] already defined module: '${name}'`)
- }
- if (typeof deps === 'function') {
- factory = deps
- deps = []
- }
- mod[name] = { name, factory, cached: false, deps }
- },
-
- /**
- * require a module.
- * @param {string} name - module name.
- */
- require (name) {
- const servMod = mod[name]
- if (!servMod) {
- return console.warn(`[amdService] module '${name}' is not defined.`)
- }
- if (servMod.cached) {
- return servMod.cached
- }
- const exports = {}
- const module = { exports }
- const { deps } = servMod
- let ret
- if (deps && deps.length >= 1) {
- /**
- * to support:
- * define(name, ['foo', 'bar'], function (foo, bar) { ... })
- */
- const args = deps.map(depName => require(depName))
- ret = servMod.factory(...args)
- }
- else {
- ret = servMod.factory(amdObject.require, exports, module)
- }
- servMod.cached = ret || module.exports
- return servMod.cached
- }
- }
- return { instance: amdObject }
- },
-
- destroy: (id, env) => {
- delete modules[id]
- }
-}
-
-export default amdService
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/services/broadcast-channel/index.js
----------------------------------------------------------------------
diff --git a/html5/services/broadcast-channel/index.js b/html5/services/broadcast-channel/index.js
deleted file mode 100644
index cc7524e..0000000
--- a/html5/services/broadcast-channel/index.js
+++ /dev/null
@@ -1,125 +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.
- */
-
-/**
- * @fileOverview
- * The polyfill of BroadcastChannel API.
- * This api can be used to achieve inter-instance communications.
- *
- * https://html.spec.whatwg.org/multipage/comms.html#broadcasting-to-other-browsing-contexts
- */
-
-import { MessageEvent } from './message-event'
-
-const channels = {}
-const instances = {}
-
-/**
- * An empty constructor for BroadcastChannel polyfill.
- * The real constructor will be defined when a Weex instance created because
- * we need to track the channel by Weex instance id.
- */
-function BroadcastChannel () {}
-
-/**
- * Sends the given message to other BroadcastChannel objects set up for this channel.
- * @param {any} message
- */
-BroadcastChannel.prototype.postMessage = function (message) {
- if (this._closed) {
- throw new Error(`BroadcastChannel "${this.name}" is closed.`)
- }
-
- const subscribers = channels[this.name]
- if (subscribers && subscribers.length) {
- for (let i = 0; i < subscribers.length; ++i) {
- const member = subscribers[i]
-
- if (member._closed || member === this) continue
-
- if (typeof member.onmessage === 'function') {
- member.onmessage(new MessageEvent('message', { data: message }))
- }
- }
- }
-}
-
-/**
- * Closes the BroadcastChannel object, opening it up to garbage collection.
- */
-BroadcastChannel.prototype.close = function () {
- if (this._closed) {
- return
- }
-
- this._closed = true
-
- // remove itself from channels.
- if (channels[this.name]) {
- const subscribers = channels[this.name].filter(x => x !== this)
- if (subscribers.length) {
- channels[this.name] = subscribers
- }
- else {
- delete channels[this.name]
- }
- }
-}
-
-export default {
- create: (id, env, config) => {
- instances[id] = []
- if (typeof global.BroadcastChannel === 'function') {
- return {}
- }
- const serviceObject = {
- /**
- * Returns a new BroadcastChannel object via which messages for the given
- * channel name can be sent and received.
- * @param {string} name
- */
- BroadcastChannel: function (name) {
- // the name property is readonly
- Object.defineProperty(this, 'name', {
- configurable: false,
- enumerable: true,
- writable: false,
- value: String(name)
- })
-
- this._closed = false
- this.onmessage = null
-
- if (!channels[this.name]) {
- channels[this.name] = []
- }
- channels[this.name].push(this)
- instances[id].push(this)
- }
- }
- serviceObject.BroadcastChannel.prototype = BroadcastChannel.prototype
- return {
- instance: serviceObject
- }
- },
- destroy: (id, env) => {
- instances[id].forEach(channel => channel.close())
- delete instances[id]
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/services/broadcast-channel/message-event.js
----------------------------------------------------------------------
diff --git a/html5/services/broadcast-channel/message-event.js b/html5/services/broadcast-channel/message-event.js
deleted file mode 100644
index 00fa36a..0000000
--- a/html5/services/broadcast-channel/message-event.js
+++ /dev/null
@@ -1,40 +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.
- */
-
-/**
- * Mock MessageEvent type
- * @param {string} type
- * @param {object} dict { data, origin, source, ports }
- *
- * This type has been simplified.
- * https://html.spec.whatwg.org/multipage/comms.html#messageevent
- * https://dom.spec.whatwg.org/#interface-event
- */
-export function MessageEvent (type, dict = {}) {
- this.type = type || 'message'
-
- this.data = dict.data || null
- this.origin = dict.origin || ''
- this.source = dict.source || null
- this.ports = dict.ports || []
-
- // inherit properties
- this.target = null
- this.timeStamp = Date.now()
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/services/index.js
----------------------------------------------------------------------
diff --git a/html5/services/index.js b/html5/services/index.js
deleted file mode 100644
index 52cd97d..0000000
--- a/html5/services/index.js
+++ /dev/null
@@ -1,23 +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 BroadcastChannel from './broadcast-channel/index'
-
-export default {
- BroadcastChannel
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/arrayFrom.js
----------------------------------------------------------------------
diff --git a/html5/shared/arrayFrom.js b/html5/shared/arrayFrom.js
deleted file mode 100644
index af5e78c..0000000
--- a/html5/shared/arrayFrom.js
+++ /dev/null
@@ -1,105 +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.
- */
-
-/* eslint-disable */
-
-// Production steps of ECMA-262, Edition 6, 22.1.2.1
-// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
-
-/* istanbul ignore if */
-if (!Array.from) {
- Array.from = (function() {
- var toStr = Object.prototype.toString;
- var isCallable = function(fn) {
- return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
- };
- var toInteger = function(value) {
- var number = Number(value);
- if (isNaN(number)) {
- return 0;
- }
- if (number === 0 || !isFinite(number)) {
- return number;
- }
- return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
- };
- var maxSafeInteger = Math.pow(2, 53) - 1;
- var toLength = function(value) {
- var len = toInteger(value);
- return Math.min(Math.max(len, 0), maxSafeInteger);
- };
-
- // The length property of the from method is 1.
- return function from(arrayLike/*, mapFn, thisArg */) {
- // 1. Let C be the this value.
- var C = this;
-
- // 2. Let items be ToObject(arrayLike).
- var items = Object(arrayLike);
-
- // 3. ReturnIfAbrupt(items).
- if (arrayLike == null) {
- throw new TypeError('Array.from requires an array-like object - not null or undefined');
- }
-
- // 4. If mapfn is undefined, then let mapping be false.
- var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
- var T;
- if (typeof mapFn !== 'undefined') {
- // 5. else
- // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
- if (!isCallable(mapFn)) {
- throw new TypeError('Array.from: when provided, the second argument must be a function');
- }
-
- // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
- if (arguments.length > 2) {
- T = arguments[2];
- }
- }
-
- // 10. Let lenValue be Get(items, "length").
- // 11. Let len be ToLength(lenValue).
- var len = toLength(items.length);
-
- // 13. If IsConstructor(C) is true, then
- // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.
- // 14. a. Else, Let A be ArrayCreate(len).
- var A = isCallable(C) ? Object(new C(len)) : new Array(len);
-
- // 16. Let k be 0.
- var k = 0;
- // 17. Repeat, while k < len… (also steps a - h)
- var kValue;
- while (k < len) {
- kValue = items[k];
- if (mapFn) {
- A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
- } else {
- A[k] = kValue;
- }
- k += 1;
- }
- // 18. Let putStatus be Put(A, "length", len, true).
- A.length = len;
- // 20. Return A.
- return A;
- };
- }());
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/console.js
----------------------------------------------------------------------
diff --git a/html5/shared/console.js b/html5/shared/console.js
deleted file mode 100644
index eb54815..0000000
--- a/html5/shared/console.js
+++ /dev/null
@@ -1,137 +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.
- */
-
-/**
- * @fileOverview
- * This file will hack `console` methods by `WXEnvironment.logLevel`.
- * So we can control how many and which messages will be sent by change the log level.
- * Additionally in native platform the message content must be primitive values and
- * using `nativeLog(...args, logLevelMark)` so we create a new `console` object in
- * global add a format process for its methods.
- */
-
-const LEVELS = ['off', 'error', 'warn', 'info', 'log', 'debug']
-let levelMap = {}
-
-const originalConsole = global.console
-
-/**
- * Hack console for native environment.
- */
-export function setNativeConsole () {
- generateLevelMap()
-
- /* istanbul ignore next */
- // mock console in native environment
- if (global.WXEnvironment && global.WXEnvironment.platform !== 'Web') {
- global.console = {
- debug: (...args) => {
- if (checkLevel('debug')) { global.nativeLog(...format(args), '__DEBUG') }
- },
- log: (...args) => {
- if (checkLevel('log')) { global.nativeLog(...format(args), '__LOG') }
- },
- info: (...args) => {
- if (checkLevel('info')) { global.nativeLog(...format(args), '__INFO') }
- },
- warn: (...args) => {
- if (checkLevel('warn')) { global.nativeLog(...format(args), '__WARN') }
- },
- error: (...args) => {
- if (checkLevel('error')) { global.nativeLog(...format(args), '__ERROR') }
- }
- }
- }
-
- // Web or Node
- else {
- const { debug, log, info, warn, error } = console
- console.__ori__ = { debug, log, info, warn, error }
- console.debug = (...args) => {
- if (checkLevel('debug')) { console.__ori__.debug.apply(console, args) }
- }
- console.log = (...args) => {
- if (checkLevel('log')) { console.__ori__.log.apply(console, args) }
- }
- console.info = (...args) => {
- if (checkLevel('info')) { console.__ori__.info.apply(console, args) }
- }
- console.warn = (...args) => {
- if (checkLevel('warn')) { console.__ori__.warn.apply(console, args) }
- }
- console.error = (...args) => {
- if (checkLevel('error')) { console.__ori__.error.apply(console, args) }
- }
- }
-}
-
-/**
- * Reset hacked console to original.
- */
-/* istanbul ignore next */
-export function resetNativeConsole () {
- levelMap = {}
- global.console = originalConsole
-}
-
-/**
- * Generate map for which types of message will be sent in a certain message level
- * as the order of LEVELS.
- */
-function generateLevelMap () {
- LEVELS.forEach(level => {
- const levelIndex = LEVELS.indexOf(level)
- levelMap[level] = {}
- LEVELS.forEach(type => {
- const typeIndex = LEVELS.indexOf(type)
- if (typeIndex <= levelIndex) {
- levelMap[level][type] = true
- }
- })
- })
-}
-
-/**
- * Check if a certain type of message will be sent in current log level of env.
- * @param {string} type
- * @return {boolean}
- */
-function checkLevel (type) {
- const logLevel = (global.WXEnvironment && global.WXEnvironment.logLevel) || 'log'
- return levelMap[logLevel] && levelMap[logLevel][type]
-}
-
-/**
- * Convert all log arguments into primitive values.
- * @param {array} args
- * @return {array}
- */
-/* istanbul ignore next */
-function format (args) {
- return args.map((v) => {
- const type = Object.prototype.toString.call(v)
- if (type.toLowerCase() === '[object object]') {
- v = JSON.stringify(v)
- }
- else {
- v = String(v)
- }
- return v
- })
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/freeze.js
----------------------------------------------------------------------
diff --git a/html5/shared/freeze.js b/html5/shared/freeze.js
deleted file mode 100644
index f997a5f..0000000
--- a/html5/shared/freeze.js
+++ /dev/null
@@ -1,90 +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.
- */
-/**
- * Freeze the prototype of javascript build-in objects.
- */
-/* istanbul ignore next */
-export function freezePrototype () {
- Object.freeze(Object)
- Object.freeze(Array)
-
- // Object.freeze(Object.prototype)
- freezeObjectProto()
- Object.freeze(Array.prototype)
- Object.freeze(String.prototype)
- Object.freeze(Number.prototype)
- Object.freeze(Boolean.prototype)
-
- // Object.freeze(Error.prototype)
- freezeErrorProto()
- Object.freeze(Date.prototype)
- Object.freeze(RegExp.prototype)
-}
-
-function freezeObjectProto () {
- const proto = Object.prototype
- const protoName = 'Object.prototype'
- freezeProtoProperty(proto, '__defineGetter__', protoName)
- freezeProtoProperty(proto, '__defineSetter__', protoName)
- freezeProtoProperty(proto, '__lookupGetter__', protoName)
- freezeProtoProperty(proto, '__lookupSetter__', protoName)
- freezeProtoProperty(proto, 'constructor', protoName)
- freezeProtoProperty(proto, 'hasOwnProperty', protoName)
- freezeProtoProperty(proto, 'isPrototypeOf', protoName)
- freezeProtoProperty(proto, 'propertyIsEnumerable', protoName)
- freezeProtoProperty(proto, 'toLocaleString', protoName)
- freezeProtoProperty(proto, 'toString', protoName)
- freezeProtoProperty(proto, 'valueOf', protoName)
- Object.seal(proto)
-}
-
-function freezeErrorProto () {
- const proto = Error.prototype
- const protoName = 'Error.prototype'
- freezeProtoProperty(proto, 'name', protoName)
- freezeProtoProperty(proto, 'message', protoName)
- freezeProtoProperty(proto, 'toString', protoName)
- freezeProtoProperty(proto, 'constructor', protoName)
- Object.seal(proto)
-}
-
-function freezeProtoProperty (proto, propertyName, protoName) {
- if (!proto.hasOwnProperty(propertyName)) {
- return
- }
-
- const origin = proto[propertyName]
- Object.defineProperty(proto, propertyName, {
- get: function () {
- return origin
- },
- set: function (value) {
- if (this === proto) {
- throw Error(`Cannot assign to read only property ${propertyName} of ${protoName}`)
- }
-
- Object.defineProperty(this, propertyName, {
- value: value,
- writable: true
- })
-
- return value
- }
- })
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/index.js
----------------------------------------------------------------------
diff --git a/html5/shared/index.js b/html5/shared/index.js
deleted file mode 100644
index 27b95c3..0000000
--- a/html5/shared/index.js
+++ /dev/null
@@ -1,32 +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 './arrayFrom'
-import './objectAssign'
-import './objectSetPrototypeOf'
-
-// import promise hack and polyfills
-import './promise'
-import 'core-js/modules/es6.object.to-string'
-import 'core-js/modules/es6.string.iterator'
-import 'core-js/modules/web.dom.iterable'
-import 'core-js/modules/es6.promise'
-
-export * from './console'
-export * from './setTimeout'
-export * from './freeze'
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/objectAssign.js
----------------------------------------------------------------------
diff --git a/html5/shared/objectAssign.js b/html5/shared/objectAssign.js
deleted file mode 100644
index 7aa5993..0000000
--- a/html5/shared/objectAssign.js
+++ /dev/null
@@ -1,19 +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 'core-js/fn/object/assign'
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/objectSetPrototypeOf.js
----------------------------------------------------------------------
diff --git a/html5/shared/objectSetPrototypeOf.js b/html5/shared/objectSetPrototypeOf.js
deleted file mode 100644
index 6364ce4..0000000
--- a/html5/shared/objectSetPrototypeOf.js
+++ /dev/null
@@ -1,74 +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.
- */
-
-/* eslint-disable */
-
-// https://gist.github.com/WebReflection/5593554
-
-/* istanbul ignore if */
-if (!Object.setPrototypeOf) {
- Object.setPrototypeOf = (function(Object, magic) {
- var set;
- function setPrototypeOf(O, proto) {
- set.call(O, proto);
- return O;
- }
- try {
- // this works already in Firefox and Safari
- set = Object.getOwnPropertyDescriptor(Object.prototype, magic).set;
- set.call({}, null);
- } catch (e) {
- if (
- // IE < 11 cannot be shimmed
- Object.prototype !== {}[magic] ||
- // neither can any browser that actually
- // implemented __proto__ correctly
- // (all but old V8 will return here)
- {__proto__: null}.__proto__ === void 0
- // this case means null objects cannot be passed
- // through setPrototypeOf in a reliable way
- // which means here a **Sham** is needed instead
- ) {
- return;
- }
- // nodejs 0.8 and 0.10 are (buggy and..) fine here
- // probably Chrome or some old Mobile stock browser
- set = function(proto) {
- this[magic] = proto;
- };
- // please note that this will **not** work
- // in those browsers that do not inherit
- // __proto__ by mistake from Object.prototype
- // in these cases we should probably throw an error
- // or at least be informed about the issue
- setPrototypeOf.polyfill = setPrototypeOf(
- setPrototypeOf({}, null),
- Object.prototype
- ) instanceof Object;
- // setPrototypeOf.polyfill === true means it works as meant
- // setPrototypeOf.polyfill === false means it's not 100% reliable
- // setPrototypeOf.polyfill === undefined
- // or
- // setPrototypeOf.polyfill == null means it's not a polyfill
- // which means it works as expected
- // we can even delete Object.prototype.__proto__;
- }
- return setPrototypeOf;
- }(Object, '__proto__'));
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/promise.js
----------------------------------------------------------------------
diff --git a/html5/shared/promise.js b/html5/shared/promise.js
deleted file mode 100644
index 39fe816..0000000
--- a/html5/shared/promise.js
+++ /dev/null
@@ -1,28 +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.
- */
-
-// fix Promise Problem on JSContext of iOS7~8
-// @see https://bugs.webkit.org/show_bug.cgi?id=135866
-
-const { WXEnvironment } = global
-
-/* istanbul ignore next */
-if (WXEnvironment && WXEnvironment.platform === 'iOS') {
- global.Promise = undefined
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/shared/setTimeout.js
----------------------------------------------------------------------
diff --git a/html5/shared/setTimeout.js b/html5/shared/setTimeout.js
deleted file mode 100644
index d545d6d..0000000
--- a/html5/shared/setTimeout.js
+++ /dev/null
@@ -1,63 +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.
- */
-
-/**
- * @fileOverview
- * Polyfill `setTimeout` on Android V8 using native method
- * `setTimeoutNative(callbackId, time)` and JS method
- * `setTimeoutCallback(callbackId)`.
- * This polyfill is only used in virtual-DOM diff & flush agorithm. Not
- * accessed by JS Bundle code (The timer APIs polyfill for JS Bundle is in
- * `html5/default/app/ctrl.js`).
- */
-
-const originalSetTimeout = global.setTimeout
-const setTimeoutNative = global.setTimeoutNative
-
-/**
- * Set up native timer
- */
-/* istanbul ignore next */
-export function setNativeTimer () {
- if (typeof setTimeout === 'undefined' &&
- typeof setTimeoutNative === 'function') {
- const timeoutMap = {}
- let timeoutId = 0
-
- global.setTimeout = (cb, time) => {
- timeoutMap[++timeoutId] = cb
- setTimeoutNative(timeoutId.toString(), time)
- }
-
- global.setTimeoutCallback = (id) => {
- if (typeof timeoutMap[id] === 'function') {
- timeoutMap[id]()
- delete timeoutMap[id]
- }
- }
- }
-}
-
-/* istanbul ignore next */
-export function resetNativeTimer () {
- global.setTimeout = originalSetTimeout
- global.setTimeoutCallback = null
-}
-
-setNativeTimer()
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/.eslintrc
----------------------------------------------------------------------
diff --git a/html5/test/case/.eslintrc b/html5/test/case/.eslintrc
deleted file mode 100644
index c892a87..0000000
--- a/html5/test/case/.eslintrc
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "globals": {
- "callNativeHandler": true,
- },
-
- "rules": {
- "no-eval": "off"
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/append-root.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/append-root.output.js b/html5/test/case/basic/append-root.output.js
deleted file mode 100644
index 3c4a5a4..0000000
--- a/html5/test/case/basic/append-root.output.js
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- type: 'container',
- style: {
- flexDirection: 'column'
- },
- attr: {
- append: "tree"
- },
- children: [{
- type: 'container',
- children: [{
- type: 'image',
- attr: {
- src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'
- }
- }, {
- type: 'text',
- attr: {
- value: 'title1'
- }
- }]
- }, {
- type: 'container',
- children: [{
- type: 'image',
- attr: {
- src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
- }
- }, {
- type: 'text',
- attr: {
- value: 'title2'
- }
- }]
- }]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/append-root.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/append-root.source.js b/html5/test/case/basic/append-root.source.js
deleted file mode 100644
index dfe60d7..0000000
--- a/html5/test/case/basic/append-root.source.js
+++ /dev/null
@@ -1,75 +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/append', function(require, exports, module) {;
- module.exports = {
- data: function() {
- return {
- itemList: [{
- itemId: '520421163634',
- title: 'title1',
- pictureUrl: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'
- }, {
- itemId: '522076777462',
- title: 'title2',
- pictureUrl: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
- }]
- }
- }
- }
-
-
- ;
- module.exports.style = {}
-
- ;
- module.exports.template = {
- "type": "container",
- "style": {
- "flexDirection": "column"
- },
- "append": "tree",
- "children": [{
- "type": "container",
- "children": [{
- "type": "image",
- "attr": {
- "src": function() {
- return this.pictureUrl
- }
- }
- }, {
- "type": "text",
- "attr": {
- "value": function() {
- return this.title
- }
- }
- }],
- "repeat": function() {
- return this.itemList
- }
- }]
- }
-
- ;
-})
-
-// require module
-
-bootstrap('@weex-component/append')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/append.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/append.output.js b/html5/test/case/basic/append.output.js
deleted file mode 100644
index 5259fb6..0000000
--- a/html5/test/case/basic/append.output.js
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- type: 'container',
- style: {
- flexDirection: 'column'
- },
- children: [{
- type: 'container',
- event: ['click'],
- attr: {
- append: 'tree'
- },
- children: [{
- type: 'container',
- children: [{
- type: 'text',
- attr: {
- value: 'any text'
- }
- }]
- }, {
- 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: 'title1'
- },
- style: {
- flex: 1,
- color: '#ff0000',
- fontSize: 48,
- fontWeight: 'bold',
- backgroundColor: '#eeeeee'
- }
- }]
- }, {
- type: 'container',
- event: ['click'],
- attr: {
- append: 'tree'
- },
- children: [{
- type: 'container',
- children: [{
- type: 'text',
- attr: {
- value: 'any text'
- }
- }]
- }, {
- type: 'image',
- attr: {
- src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
- },
- style: {
- width: 200,
- height: 200
- }
- }, {
- type: 'text',
- attr: {
- value: 'title2'
- },
- style: {
- flex: 1,
- color: '#ff0000',
- fontSize: 48,
- fontWeight: 'bold',
- backgroundColor: '#eeeeee'
- }
- }]
- }]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/append.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/append.source.js b/html5/test/case/basic/append.source.js
deleted file mode 100644
index c216578..0000000
--- a/html5/test/case/basic/append.source.js
+++ /dev/null
@@ -1,123 +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/taobao-item', function (require, exports, module) {
-
-;
- module.exports = {
- data: function () {return {
- itemId: '',
- title: '',
- pictureUrl: ''
- }},
- methods: {
- gotoDetail: function () {
- this.$openURL('https://item.taobao.com/item.htm?id=' + this.itemId)
- }
- }
- }
-
-
-;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"
- },
- "append": "tree",
- "children": [
- {
- "type": "container",
- "children": [{
- "type": "text",
- "attr": {
- "value": "any text"
- }
- }]
- },
- {
- "type": "image",
- "classList": [
- "thumb"
- ],
- "attr": {
- "src": function () {return this.pictureUrl}
- }
- },
- {
- "type": "text",
- "classList": [
- "title"
- ],
- "attr": {
- "value": function () {return this.title}
- }
- }
- ]
-}
-
-;})
-
-// module
-
-define('@weex-component/append', function (require, exports, module) {
-
-;
- module.exports = {
- data: function () {return {
- itemList: [
- {itemId: '520421163634', title: 'title1', pictureUrl: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'},
- {itemId: '522076777462', title: 'title2', pictureUrl: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'}
- ]
- }}
- }
-
-
-;module.exports.style = {}
-
-;module.exports.template = {
- "type": "container",
- "style": {
- "flexDirection": "column"
- },
- "children": [
- {
- "type": "taobao-item",
- "repeat": function () {return this.itemList}
- }
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/append')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/backward1.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/backward1.output.js b/html5/test/case/basic/backward1.output.js
deleted file mode 100644
index 8f6d086..0000000
--- a/html5/test/case/basic/backward1.output.js
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- type: 'container',
- style: {
- flexDirection: 'column'
- },
- children: [{
- 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: 'title1'
- },
- style: {
- flex: 1,
- color: '#ff0000',
- fontSize: 48,
- fontWeight: 'bold',
- backgroundColor: '#eeeeee'
- }
- }]
- }, {
- type: 'container',
- event: ['click'],
- children: [{
- type: 'image',
- attr: {
- src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
- },
- style: {
- width: 200,
- height: 200
- }
- }, {
- type: 'text',
- attr: {
- value: 'title2'
- },
- 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/html5/test/case/basic/backward1.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/backward1.source.js b/html5/test/case/basic/backward1.source.js
deleted file mode 100644
index 1bf6d74..0000000
--- a/html5/test/case/basic/backward1.source.js
+++ /dev/null
@@ -1,113 +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.
- */
-register('taobao-item', {
-
- data: function() {
- return {
- itemId: '',
- title: '',
- pictureUrl: ''
- };
- },
- methods: {
- gotoDetail: function() {
- this.$openURL('https://item.taobao.com/item.htm?id=' + this.itemId);
- }
- }
-
- ,
- style: {
- "thumb": {
- "width": 200,
- "height": 200
- },
- "title": {
- "flex": 1,
- "color": "#ff0000",
- "fontSize": 48,
- "fontWeight": "bold",
- "backgroundColor": "#eeeeee"
- }
- },
- template: {
- "type": "container",
- "events": {
- "click": "gotoDetail"
- },
- "children": [{
- "type": "image",
- "classList": [
- "thumb"
- ],
- "attr": {
- "src": function() {
- return this.pictureUrl
- }
- }
- }, {
- "type": "text",
- "classList": [
- "title"
- ],
- "attr": {
- "value": function() {
- return this.title
- }
- }
- }]
- }
-})
-
-// module
-
-register('backward1', {
-
- data: function() {
- return {
- itemList: [{
- itemId: '520421163634',
- title: 'title1',
- pictureUrl: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'
- }, {
- itemId: '522076777462',
- title: 'title2',
- pictureUrl: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
- }]
- };
- }
-
- ,
- style: {},
- template: {
- "type": "container",
- "style": {
- "flexDirection": "column"
- },
- "children": [{
- "type": "taobao-item",
- "repeat": function() {
- return this.itemList
- }
- }]
- }
-})
-
-// require module
-
-render('backward1', {})
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/backward2.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/backward2.output.js b/html5/test/case/basic/backward2.output.js
deleted file mode 100644
index 8f6d086..0000000
--- a/html5/test/case/basic/backward2.output.js
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- type: 'container',
- style: {
- flexDirection: 'column'
- },
- children: [{
- 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: 'title1'
- },
- style: {
- flex: 1,
- color: '#ff0000',
- fontSize: 48,
- fontWeight: 'bold',
- backgroundColor: '#eeeeee'
- }
- }]
- }, {
- type: 'container',
- event: ['click'],
- children: [{
- type: 'image',
- attr: {
- src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'
- },
- style: {
- width: 200,
- height: 200
- }
- }, {
- type: 'text',
- attr: {
- value: 'title2'
- },
- 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/html5/test/case/basic/backward2.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/backward2.source.js b/html5/test/case/basic/backward2.source.js
deleted file mode 100644
index cf4885a..0000000
--- a/html5/test/case/basic/backward2.source.js
+++ /dev/null
@@ -1,113 +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('taobao-item', function (require, exports, module) {
-
-;
- module.exports = {
- data: function () {return {
- itemId: '',
- title: '',
- pictureUrl: ''
- }},
- methods: {
- gotoDetail: function () {
- this.$openURL('https://item.taobao.com/item.htm?id=' + this.itemId)
- }
- }
- }
-
-
-;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": function () {return this.pictureUrl}
- }
- },
- {
- "type": "text",
- "classList": [
- "title"
- ],
- "attr": {
- "value": function () {return this.title}
- }
- }
- ]
-}
-
-;})
-
-// module
-
-define('backward2', function (require, exports, module) {
-
-;
- module.exports = {
- data: function () {return {
- itemList: [
- {itemId: '520421163634', title: 'title1', pictureUrl: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'},
- {itemId: '522076777462', title: 'title2', pictureUrl: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'}
- ]
- }}
- }
-
-
-;module.exports.style = {}
-
-;module.exports.template = {
- "type": "container",
- "style": {
- "flexDirection": "column"
- },
- "children": [
- {
- "type": "taobao-item",
- "repeat": function () {return this.itemList}
- }
- ]
-}
-
-;})
-
-// require module
-
-require('backward2')()
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/components.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/components.output.js b/html5/test/case/basic/components.output.js
deleted file mode 100644
index b7acaa4..0000000
--- a/html5/test/case/basic/components.output.js
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "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/html5/test/case/basic/components.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/components.source.js b/html5/test/case/basic/components.source.js
deleted file mode 100644
index f095486..0000000
--- a/html5/test/case/basic/components.source.js
+++ /dev/null
@@ -1,101 +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.
- */
-function otherNameFunction () {
- var module = {}
- var exports = {}
- module.exports = exports
-
- ;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.ready = function() {
- this.outerData.b = 'bb'
- }
-
- return module.exports
-}
-
-// module
-
-define('@weex-component/subvm', function (require, exports, module) {
-
-;
- module.exports = {
- "components": {
- innertpl: otherNameFunction()
- },
- 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/html5/test/case/basic/computed-in-repeat.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/computed-in-repeat.output.js b/html5/test/case/basic/computed-in-repeat.output.js
deleted file mode 100644
index 14a8d23..0000000
--- a/html5/test/case/basic/computed-in-repeat.output.js
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "type": "div",
- "children": [{
- "type": "text",
- "attr": {
- "value": "Hello Evan You"
- }
- }, {
- "type": "text",
- "attr": {
- "value": "Hello Terry King"
- }
- }, {
- "type": "text",
- "attr": {
- "value": "Jack Ma"
- }
- }]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/computed-in-repeat.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/computed-in-repeat.source.js b/html5/test/case/basic/computed-in-repeat.source.js
deleted file mode 100644
index fc203a9..0000000
--- a/html5/test/case/basic/computed-in-repeat.source.js
+++ /dev/null
@@ -1,82 +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/e9b6b411765a9cc9e9d1a0469ae0a84c', function(require, exports, module) {
-
- ;
- module.exports = {
- data: function() {
- return {
- firstName: 'Jack',
- lastName: 'Ma',
- peoples: [{
- firstName: 'Evan',
- lastName: 'You'
- }, {
- firstName: 'Terry',
- lastName: 'King'
- }]
- }
- },
- computed: {
- fullName: function() {
- return this.firstName + ' ' + this.lastName
- }
- }
- }
-
-
- ;
- module.exports.style = {}
-
- ;
- module.exports.template = {
- "type": "div",
- "classList": [
- "bg"
- ],
- "children": [{
- "type": "text",
- "repeat": function() {
- return this.peoples
- },
- "classList": [
- "text"
- ],
- "attr": {
- "value": function() {
- return 'Hello ' + (this.fullName)
- }
- }
- }, {
- "type": "text",
- "attr": {
- "value": function() {
- return this.fullName
- }
- }
- }]
- }
-
- ;
-})
-
-// require module
-bootstrap('@weex-component/e9b6b411765a9cc9e9d1a0469ae0a84c', {
- "transformerVersion": "0.3.1"
-})
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/created.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/created.output.js b/html5/test/case/basic/created.output.js
deleted file mode 100644
index 39c15f3..0000000
--- a/html5/test/case/basic/created.output.js
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "children": [
- {
- "attr": {
- "value": "1"
- },
- "type": "text"
- }
- ],
- "type": "container"
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/created.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/created.source.js b/html5/test/case/basic/created.source.js
deleted file mode 100644
index dd2ee5b..0000000
--- a/html5/test/case/basic/created.source.js
+++ /dev/null
@@ -1,56 +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/created', function(require, exports, module) {
-
- ;
- module.exports = {
- data: function() {
- return {
- text: '',
- }
- },
- created: 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/html5/test/case/basic/dynamic-id.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/dynamic-id.output.js b/html5/test/case/basic/dynamic-id.output.js
deleted file mode 100644
index 5029a30..0000000
--- a/html5/test/case/basic/dynamic-id.output.js
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- type: 'div',
- children: [
- {
- type: 'text',
- attr: {
- value: 'Hello',
- a: 1
- }
- },
- {
- type: 'text',
- attr: {
- value: 'Hello',
- a: 1,
- b: 1
- }
- },
- {
- type: 'text',
- attr: {
- value: 'Hello'
- }
- },
- {
- type: 'text',
- attr: {
- value: 'Hello'
- }
- },
- {
- type: 'text',
- attr: {
- value: 'Hello'
- }
- },
- {
- type: 'text',
- attr: {
- value: 'Hello'
- }
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/dynamic-id.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/dynamic-id.source.js b/html5/test/case/basic/dynamic-id.source.js
deleted file mode 100644
index 6616cec..0000000
--- a/html5/test/case/basic/dynamic-id.source.js
+++ /dev/null
@@ -1,94 +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/id', function (require, exports, module) {
-
-;
- module.exports = {
- ready: function () {
- if (this.$el('x')) {
- this.$el('x').setAttr('a', 1)
- }
- if (this.$el('y')) {
- this.$el('y').setAttr('a', 1)
- }
- if (this.$el('')) {
- this.$el('').setAttr('a', 1)
- }
- if (this.$el('0')) {
- this.$el('0').setAttr('a', 1)
- }
- if (this.$el(0)) {
- this.$el(0).setAttr('b', 1)
- }
- }
- }
-
-;module.exports.template = {
- "type": "div",
- "children": [
- {
- "type": "text",
- "id": function () { return "x" },
- "attr": {
- "value": "Hello"
- }
- },
- {
- "type": "text",
- "id": function () { return 0 },
- "attr": {
- "value": "Hello"
- }
- },
- {
- "type": "text",
- "id": function () { return '' },
- "attr": {
- "value": "Hello"
- }
- },
- {
- "type": "text",
- "id": function () { return null },
- "attr": {
- "value": "Hello"
- }
- },
- {
- "type": "text",
- "id": function () { return NaN },
- "attr": {
- "value": "Hello"
- }
- },
- {
- "type": "text",
- "id": function () { return },
- "attr": {
- "value": "Hello"
- }
- }
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/id')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/dynamic-property.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/dynamic-property.output.js b/html5/test/case/basic/dynamic-property.output.js
deleted file mode 100644
index 8ccc9d5..0000000
--- a/html5/test/case/basic/dynamic-property.output.js
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "type": "div",
- "children": [{
- "type": "text",
- "attr": {
- "value": "A: undefined"
- }
- }, {
- "type": "text",
- "attr": {
- "value": "B: created"
- }
- }, {
- "type": "text",
- "attr": {
- "value": "C: ready"
- }
- }, {
- "type": "text",
- "attr": {
- "value": "D: initial"
- }
- }]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/dynamic-property.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/dynamic-property.source.js b/html5/test/case/basic/dynamic-property.source.js
deleted file mode 100644
index 880d468..0000000
--- a/html5/test/case/basic/dynamic-property.source.js
+++ /dev/null
@@ -1,79 +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/dynamic-property', function (require, exports, module) {
-
- ;module.exports.style = {}
-
- ;module.exports = {
- data: function () {return {
- A: {},
- B: {},
- C: {
- message: 'initial'
- },
- D: {
- message: 'initial'
- }
- }},
-
- created: function() {
- this.B.message = 'created'
- this.C.message = 'created'
- },
-
- ready: function() {
- this.A.message = 'ready'
- this.B.message = 'ready'
- this.C.message = 'ready'
- }
- }
-
- ;module.exports.template = {
- "type": "div",
- "children": [
- {
- "type": "text",
- "attr": {
- "value": function () {return 'A: ' + (this.A.message)}
- }
- },
- {
- "type": "text",
- "attr": {
- "value": function () {return 'B: ' + (this.B.message)}
- }
- },
- {
- "type": "text",
- "attr": {
- "value": function () {return 'C: ' + (this.C.message)}
- }
- },
- {
- "type": "text",
- "attr": {
- "value": function () {return 'D: ' + (this.D.message)}
- }
- }
- ]
- }
-
-;})
-
-bootstrap('@weex-component/dynamic-property')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/dynamic-type.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/dynamic-type.output.js b/html5/test/case/basic/dynamic-type.output.js
deleted file mode 100644
index d6881a4..0000000
--- a/html5/test/case/basic/dynamic-type.output.js
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- type: 'container',
- children: [{
- type: 'text',
- style: {
- width: 200,
- height: 200
- }
- }]
-}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/dynamic-type.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/dynamic-type.source.js b/html5/test/case/basic/dynamic-type.source.js
deleted file mode 100644
index 62b8f72..0000000
--- a/html5/test/case/basic/dynamic-type.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/dynamic-type', function (require, exports, module) {
-
-;
- module.exports = {
- data: function () {return {
- type: 'text'
- }}
- }
-
-;module.exports.template = {
- "type": "container",
- "children": [
- {
- "type": function () {return this.type},
- "style": {
- "width": 200,
- "height": 200
- }
- }
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/dynamic-type')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo.output.js b/html5/test/case/basic/foo.output.js
deleted file mode 100644
index 1372f91..0000000
--- a/html5/test/case/basic/foo.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/basic/foo.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo.source.js b/html5/test/case/basic/foo.source.js
deleted file mode 100644
index 027eee1..0000000
--- a/html5/test/case/basic/foo.source.js
+++ /dev/null
@@ -1,44 +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')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo2.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo2.output.js b/html5/test/case/basic/foo2.output.js
deleted file mode 100644
index d7cc321..0000000
--- a/html5/test/case/basic/foo2.output.js
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- type: 'container',
- attr: {
- a: '1',
- b: 1
- },
- style: {
- fontSize: 12
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo2.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo2.source.js b/html5/test/case/basic/foo2.source.js
deleted file mode 100644
index cabf559..0000000
--- a/html5/test/case/basic/foo2.source.js
+++ /dev/null
@@ -1,52 +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/foo2', function (require, exports, module) {
-
-;
- module.exports = {
- data: function () {
- return {
- x: 1
- }
- }
- }
-
-
-;module.exports.style = {
- "a": {
- "fontSize": 12
- }
-}
-
-;module.exports.template = {
- "type": "container",
- "attr": {
- "a": "1",
- "b": function () {return this.x}
- },
- "classList": [
- "a"
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/foo2')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo3.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo3.output.js b/html5/test/case/basic/foo3.output.js
deleted file mode 100644
index 51c886e..0000000
--- a/html5/test/case/basic/foo3.output.js
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- 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/html5/test/case/basic/foo3.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo3.source.js b/html5/test/case/basic/foo3.source.js
deleted file mode 100644
index 7fda995..0000000
--- a/html5/test/case/basic/foo3.source.js
+++ /dev/null
@@ -1,41 +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/foo3', function (require, exports, module) {
-
-;
-
-;module.exports.style = {}
-
-;module.exports.template = {
- "type": "container",
- "children": [
- {
- "type": "text",
- "attr": {
- "value": "Hello World"
- }
- }
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/foo3')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo4.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo4.output.js b/html5/test/case/basic/foo4.output.js
deleted file mode 100644
index bef3668..0000000
--- a/html5/test/case/basic/foo4.output.js
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- type: 'container',
- children: [{
- type: 'text',
- attr: {
- value: 'Hello World'
- },
- style: {
- color: '#ff0000'
- }
- }]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo4.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo4.source.js b/html5/test/case/basic/foo4.source.js
deleted file mode 100644
index f842abf..0000000
--- a/html5/test/case/basic/foo4.source.js
+++ /dev/null
@@ -1,44 +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/foo4', function (require, exports, module) {
-
-;
-
-;module.exports.style = {}
-
-;module.exports.template = {
- "type": "container",
- "children": [
- {
- "type": "text",
- "style": {
- "color": "#ff0000"
- },
- "attr": {
- "value": "Hello World"
- }
- }
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/foo4')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo5.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo5.output.js b/html5/test/case/basic/foo5.output.js
deleted file mode 100644
index 840cefb..0000000
--- a/html5/test/case/basic/foo5.output.js
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- type: 'container',
- children: [{
- type: 'text',
- attr: {
- value: 'Hello World'
- },
- style: {
- color: '#ff0000',
- fontSize: 48,
- fontWeight: 'bold'
- }
- }]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo5.source.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo5.source.js b/html5/test/case/basic/foo5.source.js
deleted file mode 100644
index b09fc03..0000000
--- a/html5/test/case/basic/foo5.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/foo5', function (require, exports, module) {
-
-;
-
-;module.exports.style = {
- "title": {
- "color": "#ff0000",
- "fontSize": 48,
- "fontWeight": "bold"
- }
-}
-
-;module.exports.template = {
- "type": "container",
- "children": [
- {
- "type": "text",
- "classList": [
- "title"
- ],
- "attr": {
- "value": "Hello World"
- }
- }
- ]
-}
-
-;})
-
-// require module
-
-bootstrap('@weex-component/foo5')
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/51dd277e/html5/test/case/basic/foo6.output.js
----------------------------------------------------------------------
diff --git a/html5/test/case/basic/foo6.output.js b/html5/test/case/basic/foo6.output.js
deleted file mode 100644
index 1a8fd90..0000000
--- a/html5/test/case/basic/foo6.output.js
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- type: 'container',
- style: {
- flexDirection: 'row'
- },
- children: [{
- type: 'image',
- attr: {
- src: 'http://gw.alicdn.com/tfscom/TB1OMfAJFXXXXbfXXXXqVMCNVXX-400-400.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