diff --git a/.gitignore b/.gitignore index 1c5e235619..b7d80e39dd 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ *.sw* # Created by Builder -examples/build web-entry test/build weex_tmp @@ -26,22 +25,6 @@ pids *.pid *.seed -# e2e test -html5/test/e2e/reports -html5/test/e2e/screenshots -html5/test/e2e/logs - -# render test -html5/test/render/vue/data/build -examples/vue/test/ - -# Created by Weex Web Packer -html5/browser/extend/packer.js -html5/render/browser/extend/packer.js - -# Created by weex-vue-bundle-util -weex-vue-plugins.js - android/playground/app/gradlew android/playground/app/gradlew.bat android/playground/app/gradle/wrapper/gradle-wrapper.jar diff --git a/build/rollup.browser.common.config.js b/build/rollup.browser.common.config.js deleted file mode 100644 index dd8c41c2ee..0000000000 --- a/build/rollup.browser.common.config.js +++ /dev/null @@ -1,53 +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 { rollup } from 'rollup' -import postcss from 'rollup-plugin-postcss' -import json from 'rollup-plugin-json' -import eslint from 'rollup-plugin-eslint' -import nodeResolve from 'rollup-plugin-node-resolve' -import commonjs from 'rollup-plugin-commonjs' -import buble from 'rollup-plugin-buble' - -const pkg = require('../package.json') -const version = pkg.subversion.browser -const date = new Date().toISOString().split('T')[0].replace(/\-/g, '') -const banner = `\ -console.log('START WEEX HTML5: ${version} Build ${date}'); -` - -export default { - entry: './html5/render/browser/index.js', - dest: './dist/browser.common.js', - banner, - format: 'cjs', - plugins: [ - postcss(), - json(), - eslint({ - exclude: ['./package.json', '**/*.css'] - }), - nodeResolve({ - jsnext: true, - main: true, - browser: true - }), - commonjs(), - buble() - ] -} diff --git a/build/webpack.examples.config.js b/build/webpack.examples.config.js deleted file mode 100644 index 5d8b25d89c..0000000000 --- a/build/webpack.examples.config.js +++ /dev/null @@ -1,72 +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. - */ -var path = require('path'); -var fs = require('fs'); -var webpack = require('webpack'); -// var bannerWebpackPlugin = require('./examples-banner-plugin') - -var entry = {}; -var bannerExcludeFiles = []; - -function walk(dir) { - dir = dir || '.' - var directory = path.join(__dirname, '../examples', dir); - fs.readdirSync(directory) - .forEach(function(file) { - var fullpath = path.join(directory, file); - var stat = fs.statSync(fullpath); - var extname = path.extname(fullpath); - if (stat.isFile() && (extname === '.we' || extname === '.vue')) { - var name = path.join('examples', 'build', dir, path.basename(file, extname)); - entry[name] = fullpath + '?entry=true'; - if (extname === '.we') { - bannerExcludeFiles.push(name + '.js') - } - } else if (stat.isDirectory() && file !== 'build' && file !== 'include') { - var subdir = path.join(dir, file); - walk(subdir); - } - }); -} - -walk(); - -var banner = '// { "framework": "Vue" }\n' - -var bannerPlugin = new webpack.BannerPlugin(banner, { - raw: true, - exclude: bannerExcludeFiles -}) - -module.exports = { - entry: entry, - output : { - path: '.', - filename: '[name].js' - }, - module: { - loaders: [ - { - test: /\.(we|vue)(\?[^?]+)?$/, - loader: 'weex' - } - ] - }, - plugins: [bannerPlugin] -} diff --git a/build/webpack.examples.web.config.js b/build/webpack.examples.web.config.js deleted file mode 100644 index c28db5789e..0000000000 --- a/build/webpack.examples.web.config.js +++ /dev/null @@ -1,99 +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. - */ - -var path = require('path'); -var fs = require('fs-extra'); -var webpack = require('webpack'); - -var entry = {}; -var bannerExcludeFiles = []; -var webSrcDirectory = path.join(__dirname, '../examples/web-entry'); - -function getEntryFileContent (entryPath, vueFilePath) { - const relativePath = path.relative(path.join(entryPath, '../'), vueFilePath); - return 'var App = require(\'' + relativePath + '\')\n' - + 'App.el = \'#root\'\n' - + 'new Vue(App)\n' -} - -function walk(dir) { - dir = dir || '.'; - var directory = path.join(__dirname, '../examples', dir); - var entryDirectory = path.join(webSrcDirectory, dir); - fs.readdirSync(directory) - .forEach(function(file) { - var fullpath = path.join(directory, file); - var stat = fs.statSync(fullpath); - var extname = path.extname(fullpath); - if (stat.isFile() && extname === '.vue') { - var entryFile = path.join(entryDirectory, path.basename(file, extname) + '.js'); - fs.outputFileSync(entryFile, getEntryFileContent(entryFile, fullpath)); - var name = path.join('examples', 'build/vue-web', /*path.relative('vue', dir)*/dir, path.basename(file, extname)); - entry[name] = entryFile + '?entry=true'; - } else if (stat.isDirectory() && file !== 'build' && file !== 'include') { - var subdir = path.join(dir, file); - walk(subdir); - } - }); -} - -walk(); - -var banner = '// NOTE: for vue2.0 and platform:web only.\n' - -var bannerPlugin = new webpack.BannerPlugin(banner, { - raw: true, - exclude: bannerExcludeFiles -}) - -module.exports = { - entry: entry, - output: { - path: '.', - filename: '[name].js' - }, - module: { - loaders: [ - { - test: /\.js$/, - loaders: ['babel-loader'], - exclude: /node_modules/ - }, { - test: /\.vue(\?[^?]+)?$/, - loaders: ['vue-loader'] - } - ] - }, - vue: { - optimizeSSR: false, - /** - * important! should use postTransformNode to add $processStyle for - * inline style prefixing. - */ - compilerModules: [ - { - postTransformNode: el => { - el.staticStyle = `$processStyle(${el.staticStyle})` - el.styleBinding = `$processStyle(${el.styleBinding})` - } - } - ], - }, - plugins: [bannerPlugin] -} diff --git a/examples/.gitignore b/examples/.gitignore deleted file mode 100644 index 2642f80a43..0000000000 --- a/examples/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -local-* -archive/ \ No newline at end of file diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 6df102fbae..0000000000 --- a/examples/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Example Guide - -## Add an example - -* Add a file `newExample.we` copied from [template](./template.we) with [UI Gallery](#ui-gallery) (recommended). -* In [index.we](./index.we), add an item `{name: 'newExample', title: 'New Example'}` for array `data.cases` - -## Rule - -0. File name is dash (`-`) separated words, and each word is lower case, e.g. `index.we`, `style-demo.we` -0. ***DO NOT*** use [builtin components](../doc/components) name as file name, it may fail to run. - -## UI Gallery - -> Inspired by Bootstrap. - -We import a simple UI Gallery for a consistent UI style. See [UI Gallery Example](./showcase/ui.we) for details. - - - -Reference: https://www.npmjs.com/package/weex-components diff --git a/examples/vanilla/index.js b/examples/vanilla/index.js deleted file mode 100644 index 6ab399f2e1..0000000000 --- a/examples/vanilla/index.js +++ /dev/null @@ -1,42 +0,0 @@ -// { "framework": "Vanilla" } - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -var body = document.createElement('div', { - classStyle: { alignItems: 'center', marginTop: 120 } -}) - -var image = document.createElement('image', { - attr: { src: 'https://alibaba.github.io/weex/img/weex_logo_blue@3x.png' }, - classStyle: { width: 360, height: 82 } -}) - -var text = document.createElement('text', { - attr: { value: 'Hello World' }, - classStyle: { fontSize: 48 } -}) - -body.appendChild(image) -body.appendChild(text) -document.documentElement.appendChild(body) - -body.addEvent('click', function () { - text.setAttr('value', 'Hello Weex') -}) diff --git a/examples/vue/animation.vue b/examples/vue/animation.vue deleted file mode 100644 index ef6afcfd82..0000000000 --- a/examples/vue/animation.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - diff --git a/examples/vue/components/a.vue b/examples/vue/components/a.vue deleted file mode 100644 index ff0149bfb8..0000000000 --- a/examples/vue/components/a.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/examples/vue/components/countdown.vue b/examples/vue/components/countdown.vue deleted file mode 100644 index 487d1c44b4..0000000000 --- a/examples/vue/components/countdown.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - - diff --git a/examples/vue/components/image.vue b/examples/vue/components/image.vue deleted file mode 100644 index 74b74302a9..0000000000 --- a/examples/vue/components/image.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/examples/vue/components/input.vue b/examples/vue/components/input.vue deleted file mode 100644 index ab950a403c..0000000000 --- a/examples/vue/components/input.vue +++ /dev/null @@ -1,210 +0,0 @@ - - - - - diff --git a/examples/vue/components/list.vue b/examples/vue/components/list.vue deleted file mode 100644 index c894258e1f..0000000000 --- a/examples/vue/components/list.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - - diff --git a/examples/vue/components/marquee.vue b/examples/vue/components/marquee.vue deleted file mode 100644 index e1971533f0..0000000000 --- a/examples/vue/components/marquee.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - diff --git a/examples/vue/components/navigator.vue b/examples/vue/components/navigator.vue deleted file mode 100644 index ab1423fa1a..0000000000 --- a/examples/vue/components/navigator.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - diff --git a/examples/vue/components/scroller.vue b/examples/vue/components/scroller.vue deleted file mode 100644 index 8336ea0eea..0000000000 --- a/examples/vue/components/scroller.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - - - diff --git a/examples/vue/components/slider.vue b/examples/vue/components/slider.vue deleted file mode 100644 index 5985b68a51..0000000000 --- a/examples/vue/components/slider.vue +++ /dev/null @@ -1,264 +0,0 @@ - - - - - diff --git a/examples/vue/components/sliderinfinite.vue b/examples/vue/components/sliderinfinite.vue deleted file mode 100644 index 4a3702ee08..0000000000 --- a/examples/vue/components/sliderinfinite.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/vue/components/tabbar.vue b/examples/vue/components/tabbar.vue deleted file mode 100644 index 7cc54ae6d0..0000000000 --- a/examples/vue/components/tabbar.vue +++ /dev/null @@ -1,63 +0,0 @@ - - - diff --git a/examples/vue/components/text.vue b/examples/vue/components/text.vue deleted file mode 100644 index 19f34aa42c..0000000000 --- a/examples/vue/components/text.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - - diff --git a/examples/vue/components/textarea.vue b/examples/vue/components/textarea.vue deleted file mode 100644 index 580e390f34..0000000000 --- a/examples/vue/components/textarea.vue +++ /dev/null @@ -1,57 +0,0 @@ -