You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by da...@apache.org on 2017/08/17 03:59:32 UTC

[15/43] incubator-weex git commit: + [build] add build script for vanilla framework

+ [build] add build script for vanilla framework


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f3ebd620
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f3ebd620
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f3ebd620

Branch: refs/heads/0.16-dev
Commit: f3ebd620b93d2af1528018cd3567e201d3c90a6f
Parents: 9510e8b
Author: Hanks <zh...@gmail.com>
Authored: Tue Aug 8 11:31:13 2017 +0800
Committer: Hanks <zh...@gmail.com>
Committed: Tue Aug 8 11:31:13 2017 +0800

----------------------------------------------------------------------
 build/build.js  |  1 +
 build/config.js | 15 ++++++++++++++-
 package.json    |  2 ++
 3 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f3ebd620/build/build.js
----------------------------------------------------------------------
diff --git a/build/build.js b/build/build.js
index 5327ac1..9ddf8a1 100644
--- a/build/build.js
+++ b/build/build.js
@@ -170,6 +170,7 @@ function build (name) {
     case 'native': pkgName = 'weex-js-framework'; break;
     case 'runtime': pkgName = 'weex-js-runtime'; break;
     case 'legacy': pkgName = 'weex-legacy-framework'; break;
+    case 'vanilla': pkgName = 'weex-vanilla-framework'; break;
     case 'browser': pkgName = 'weex-web-render'; break;
     case 'vue': pkgName = 'weex-vue-render'; break;
     case 'vue-plugins': pkgName = 'weex-vue-render-plugins'; break;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f3ebd620/build/config.js
----------------------------------------------------------------------
diff --git a/build/config.js b/build/config.js
index f422a58..cf112f5 100644
--- a/build/config.js
+++ b/build/config.js
@@ -64,7 +64,7 @@ const configs = {
     ]
   },
   'weex-legacy-framework': {
-    moduleName: 'WeexVanillaFramework',
+    moduleName: 'WeexLegacyFramework',
     entry: absolute('html5/frameworks/legacy/index.js'),
     dest: absolute('packages/weex-legacy-framework/index.js'),
     banner: `/* 'WEEX VANILLA FRAMEWORK ${subversion.framework}, Build ${now()}. */\n`,
@@ -76,6 +76,19 @@ const configs = {
       }),
     ]
   },
+  'weex-vanilla-framework': {
+    moduleName: 'WeexVanillaFramework',
+    entry: absolute('html5/frameworks/vanilla/index.js'),
+    dest: absolute('packages/weex-vanilla-framework/index.js'),
+    banner: `/* 'Weex Vanilla Framework ${subversion.framework}, Build ${now()}. */\n`,
+    format: 'umd',
+    plugins: [
+      nodeResolve({
+        jsnext: true,
+        main: true
+      }),
+    ]
+  },
   'weex-web-render': {
     moduleName: 'Weex',
     entry: absolute('html5/render/browser/index.js'),

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f3ebd620/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 2ca642d..8276b8a 100644
--- a/package.json
+++ b/package.json
@@ -41,6 +41,7 @@
     "build:native": "node build/build.js native",
     "build:runtime": "node build/build.js runtime",
     "build:legacy": "node build/build.js legacy",
+    "build:vanilla": "node build/build.js vanilla",
     "install:buildtools": "npm i webpack@^1.0 weex-vue-bundle-util rollup rollup-watch rollup-plugin-buble rollup-plugin-json rollup-plugin-eslint rollup-plugin-commonjs rollup-plugin-flow rollup-plugin-flow-no-whitespace rollup-plugin-postcss rollup-plugin-replace rollup-plugin-uglify rollup-plugin-node-resolve wwp flow-bin babel-core babel-eslint babel-istanbul babel-loader babel-plugin-coverage babel-preset-es2015 babel-runtime eslint-plugin-flowtype",
     "build:source": "npm run build:native && npm run build:browser && node build/build.js vue",
     "build:browser": "wwp && node build/build.js browser",
@@ -64,6 +65,7 @@
     "dev:native": "node build/build.js native --watch",
     "dev:runtime": "node build/build.js runtime --watch",
     "dev:legacy": "node build/build.js legacy --watch",
+    "dev:vanilla": "node build/build.js vanilla --watch",
     "dev:browser": "wwp && node build/build.js native --watch",
     "dev:vue": "node build/build.js vue --watch",
     "dev:examples": "webpack --watch --config build/webpack.examples.config.js",