Permalink
Browse files

wip: weex framework integration

  • Loading branch information...
1 parent 550dcee commit cb253d74052ce6ec27bb4961314c7b1bb6d003b9 @yyx990803 yyx990803 committed Nov 5, 2016
Showing with 13,404 additions and 4 deletions.
  1. +1 −0 .flowconfig
  2. +1 −0 build/alias.js
  3. +13 −0 build/config.js
  4. +1 −0 build/release-weex.sh
  5. +9 −2 package.json
  6. +1 −1 packages/vue-server-renderer/package.json
  7. +1 −1 packages/vue-template-compiler/package.json
  8. +3 −0 packages/weex-template-compiler/README.md
  9. +5,371 −0 packages/weex-template-compiler/build.js
  10. +17 −0 packages/weex-template-compiler/index.js
  11. +24 −0 packages/weex-template-compiler/package.json
  12. +4,855 −0 packages/weex-vue-framework/index.js
  13. +23 −0 packages/weex-vue-framework/package.json
  14. +29 −0 src/entries/weex-compiler.js
  15. +384 −0 src/entries/weex-framework.js
  16. +2 −0 src/platforms/weex/compiler/directives/index.js
  17. +95 −0 src/platforms/weex/compiler/index.js
  18. +22 −0 src/platforms/weex/compiler/modules/append.js
  19. +75 −0 src/platforms/weex/compiler/modules/class.js
  20. +9 −0 src/platforms/weex/compiler/modules/index.js
  21. +84 −0 src/platforms/weex/compiler/modules/style.js
  22. +16 −0 src/platforms/weex/runtime/config.js
  23. +2 −0 src/platforms/weex/runtime/directives/index.js
  24. +29 −0 src/platforms/weex/runtime/index.js
  25. +35 −0 src/platforms/weex/runtime/modules/attrs.js
  26. +59 −0 src/platforms/weex/runtime/modules/class.js
  27. +25 −0 src/platforms/weex/runtime/modules/events.js
  28. +11 −0 src/platforms/weex/runtime/modules/index.js
  29. +68 −0 src/platforms/weex/runtime/modules/style.js
  30. +78 −0 src/platforms/weex/runtime/node-ops.js
  31. +12 −0 src/platforms/weex/runtime/patch.js
  32. +16 −0 src/platforms/weex/util/index.js
  33. +5 −0 test/weex/.eslintrc
  34. 0 test/weex/compiler/append.spec.js
  35. +55 −0 test/weex/compiler/class.spec.js
  36. +45 −0 test/weex/compiler/compile.spec.js
  37. +82 −0 test/weex/compiler/style.spec.js
  38. +60 −0 test/weex/helpers/index.js
  39. +9 −0 test/weex/jasmine.json
  40. +124 −0 test/weex/runtime/attrs.spec.js
  41. +238 −0 test/weex/runtime/class.spec.js
  42. +144 −0 test/weex/runtime/events.spec.js
  43. +592 −0 test/weex/runtime/framework.spec.js
  44. +518 −0 test/weex/runtime/node.spec.js
  45. +161 −0 test/weex/runtime/style.spec.js
View
@@ -15,6 +15,7 @@ module.name_mapper='^compiler/\(.*\)$' -> '<PROJECT_ROOT>/src/compiler/\1'
module.name_mapper='^core/\(.*\)$' -> '<PROJECT_ROOT>/src/core/\1'
module.name_mapper='^shared/\(.*\)$' -> '<PROJECT_ROOT>/src/shared/\1'
module.name_mapper='^web/\(.*\)$' -> '<PROJECT_ROOT>/src/platforms/web/\1'
+module.name_mapper='^weex/\(.*\)$' -> '<PROJECT_ROOT>/src/platforms/weex/\1'
module.name_mapper='^server/\(.*\)$' -> '<PROJECT_ROOT>/src/server/\1'
module.name_mapper='^entries/\(.*\)$' -> '<PROJECT_ROOT>/src/entries/\1'
module.name_mapper='^sfc/\(.*\)$' -> '<PROJECT_ROOT>/src/sfc/\1'
View
@@ -6,6 +6,7 @@ module.exports = {
core: path.resolve(__dirname, '../src/core'),
shared: path.resolve(__dirname, '../src/shared'),
web: path.resolve(__dirname, '../src/platforms/web'),
+ weex: path.resolve(__dirname, '../src/platforms/weex'),
server: path.resolve(__dirname, '../src/server'),
entries: path.resolve(__dirname, '../src/entries'),
sfc: path.resolve(__dirname, '../src/sfc')
View
@@ -64,6 +64,19 @@ const builds = {
dest: path.resolve(__dirname, '../packages/vue-server-renderer/build.js'),
format: 'cjs',
external: ['stream', 'module', 'vm', 'he', 'de-indent']
+ },
+ // Weex runtime framework (CommonJS).
+ 'weex-framework': {
+ entry: path.resolve(__dirname, '../src/entries/weex-framework.js'),
+ dest: path.resolve(__dirname, '../packages/weex-vue-framework/index.js'),
+ format: 'cjs'
+ },
+ // Weex compiler (CommonJS). Used by Weex's Webpack loader.
+ 'weex-compiler': {
+ entry: path.resolve(__dirname, '../src/entries/weex-compiler.js'),
+ dest: path.resolve(__dirname, '../packages/weex-template-compiler/build.js'),
+ format: 'cjs',
+ external: ['entities', 'de-indent']
}
}
@@ -0,0 +1 @@
+# TODO, only release weex package by bumping the weex postfix
View
@@ -23,20 +23,25 @@
"dev:test": "karma start build/karma.dev.config.js",
"dev:ssr": "TARGET=web-server-renderer rollup -w -c build/config.js",
"dev:compiler": "TARGET=web-compiler rollup -w -c build/config.js",
+ "dev:weex": "TARGET=weex-framework rollup -w -c build/config.js",
+ "dev:weex:compiler": "TARGET=weex-compiler rollup -w -c build/config.js",
"build": "node build/build.js",
"build:ssr": "npm run build -- vue.common.js,vue-server-renderer",
+ "build:weex": "npm run build -- weex-vue-framework,weex-template-compiler",
"test": "npm run lint && flow check && npm run test:types && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr",
"test:unit": "karma start build/karma.unit.config.js",
"test:cover": "karma start build/karma.cover.config.js",
"test:e2e": "npm run build -- vue.min.js && node test/e2e/runner.js",
+ "test:weex": "npm run build:weex && jasmine JASMINE_CONFIG_PATH=test/weex/jasmine.json",
"test:ssr": "npm run build:ssr && VUE_ENV=server jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.json",
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
"test:types": "tsc -p ./types/test/tsconfig.json",
"lint": "eslint src build test",
"flow": "flow check",
"sauce": "SAUCE=true karma start build/karma.sauce.config.js",
"bench:ssr": "npm run build:ssr && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToString.js && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToStream.js",
- "release": "bash build/release.sh"
+ "release": "bash build/release.sh",
+ "release:weex": "bash build/release-weex.sh"
},
"repository": {
"type": "git",
@@ -99,6 +104,8 @@
"selenium-server": "2.53.1",
"typescript": "^2.0.2",
"uglify-js": "^2.6.2",
- "webpack": "^1.13.2"
+ "webpack": "^1.13.2",
+ "weex-js-runtime": "^0.17.0-alpha4",
+ "weex-vdom-tester": "^0.1.3"
}
}
@@ -21,5 +21,5 @@
"he": "^1.1.0",
"de-indent": "^1.0.2"
},
- "homepage": "https://github.com/vuejs/vue#readme"
+ "homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue-server-renderer#readme"
}
@@ -16,7 +16,7 @@
"bugs": {
"url": "https://github.com/vuejs/vue/issues"
},
- "homepage": "https://github.com/vuejs/vue#readme",
+ "homepage": "https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#readme",
"dependencies": {
"he": "^1.1.0",
"de-indent": "^1.0.2"
@@ -0,0 +1,3 @@
+# weex-template-compiler
+
+> This package is auto-generated. For pull requests please see [src/entries/weex-compiler.js](https://github.com/weexteam/weex-vue-framework/blob/dev-weex/src/entries/weex-compiler.js).
Oops, something went wrong.

0 comments on commit cb253d7

Please sign in to comment.