[Pkg-javascript-commits] [vue.js] 01/01: build with webpack
Paolo Greppi
paolog-guest at moszumanska.debian.org
Thu Dec 7 10:29:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
paolog-guest pushed a commit to branch master
in repository vue.js.
commit 0318169fd66ada17138bce7721ffd023d5e74ff3
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date: Thu Dec 7 11:29:16 2017 +0100
build with webpack
---
debian/control | 3 +++
debian/patches/01-weex.diff | 16 ++++++++++++++++
debian/patches/02-babelrc.diff | 22 ++++++++++++++++++++++
debian/patches/series | 4 +++-
debian/rules | 9 ++++++---
debian/webpack.config.js | 23 +++++++++++++++++++++++
6 files changed, 73 insertions(+), 4 deletions(-)
diff --git a/debian/control b/debian/control
index c66613f..127ce09 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,9 @@ Build-Depends:
debhelper (>= 10)
, dh-buildinfo
, nodejs
+ , webpack
+ , node-babel-loader
+ , node-babel-plugin-add-module-exports
Standards-Version: 4.1.1
Homepage: https://github.com/vuejs/vue#readme
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/vue.js.git
diff --git a/debian/patches/01-weex.diff b/debian/patches/01-weex.diff
new file mode 100644
index 0000000..ece2f71
--- /dev/null
+++ b/debian/patches/01-weex.diff
@@ -0,0 +1,16 @@
+Description: Insert required variable definition.
+Forwarded: not-needed
+Author: Paolo Greppi <paolo.greppi at libpf.com>
+
+Index: vue.js/src/core/vdom/patch.js
+===================================================================
+--- vue.js.orig/src/core/vdom/patch.js
++++ vue.js/src/core/vdom/patch.js
+@@ -150,6 +150,7 @@ export function createPatchFunction (bac
+ setScope(vnode)
+
+ /* istanbul ignore if */
++ const __WEEX__ = false;
+ if (__WEEX__) {
+ // in Weex, the default insertion order is parent-first.
+ // List items can be optimized to use children-first insertion
diff --git a/debian/patches/02-babelrc.diff b/debian/patches/02-babelrc.diff
new file mode 100644
index 0000000..0d8359e
--- /dev/null
+++ b/debian/patches/02-babelrc.diff
@@ -0,0 +1,22 @@
+Description: Provide a babel configuration file.
+Forwarded: not-needed
+Author: Paolo Greppi <paolo.greppi at libpf.com>
+
+Index: vue.js/.babelrc
+===================================================================
+--- vue.js.orig/.babelrc
++++ vue.js/.babelrc
+@@ -1,6 +1,11 @@
+ {
+- "presets": ["es2015", "flow-vue"],
+- "plugins": ["transform-vue-jsx", "syntax-dynamic-import"],
++ "presets": [
++ "es2015",
++ "flow-vue"],
++ "plugins": [
++ "syntax-dynamic-import",
++ "babel-plugin-add-module-exports",
++ ],
+ "ignore": [
+ "dist/*.js",
+ "packages/**/*.js"
diff --git a/debian/patches/series b/debian/patches/series
index 75604d2..bee0bb6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
-00-examples.diff
+00-babelrc.diff
+01-weex.diff
+02-examples.diff
diff --git a/debian/rules b/debian/rules
index de57af0..d6cc623 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,9 +7,12 @@
%:
dh $@
-#override_dh_auto_build:
+override_dh_auto_build:
+ dh_auto_build
+ webpack --config debian/webpack.config.js
#override_dh_auto_test:
-
-
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -rf dist
diff --git a/debian/webpack.config.js b/debian/webpack.config.js
new file mode 100644
index 0000000..9322509
--- /dev/null
+++ b/debian/webpack.config.js
@@ -0,0 +1,23 @@
+'use strict';
+var fs = require('fs');
+var path = require('path');
+var webpack = require('webpack');
+var config = {
+ target: 'web',
+ entry: './src/platforms/web/entry-runtime-with-compiler.js',
+ resolve: {
+ modules: ['/usr/lib/nodejs', './src', './src/platforms'],
+ },
+ resolveLoader: {
+ modules: ['/usr/lib/nodejs'],
+ },
+ output: {
+ path: path.resolve(__dirname, '../dist'),
+ filename: 'vue.js',
+ library: "Vue",
+ libraryTarget: 'umd',
+ umdNamedDefine: true
+ },
+ module: { rules: [ { use: [ 'babel-loader' ] } ] }
+}
+module.exports = config;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/vue.js.git
More information about the Pkg-javascript-commits
mailing list