[Pkg-javascript-commits] [libjs-handlebars] 01/03: use webpack command to generate umd module

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Oct 23 12:17:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository libjs-handlebars.

commit 0f2e3246f0cec479832ab1002fa6a8d95cd84a52
Author: Pirate Praveen <praveen at debian.org>
Date:   Mon Oct 23 17:18:09 2017 +0530

    use webpack command to generate umd module
---
 debian/libjs-handlebars.install              |  2 +-
 debian/libjs-handlebars.runtime.install      |  2 +-
 debian/patches/series                        |  1 +
 debian/patches/use-babelrc-for-webpack.patch | 10 ++++++++++
 debian/rules                                 |  2 ++
 debian/webpack.config.js                     | 18 ++++++++++++++++++
 6 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/debian/libjs-handlebars.install b/debian/libjs-handlebars.install
index c34ebce..49cb5d6 100644
--- a/debian/libjs-handlebars.install
+++ b/debian/libjs-handlebars.install
@@ -1 +1 @@
-dist/cjs/handlebars.js usr/share/javascript/handlebars
+dist/handlebars.js usr/share/javascript/handlebars
diff --git a/debian/libjs-handlebars.runtime.install b/debian/libjs-handlebars.runtime.install
index 8417c1a..2eab71c 100644
--- a/debian/libjs-handlebars.runtime.install
+++ b/debian/libjs-handlebars.runtime.install
@@ -1 +1 @@
-dist/cjs/handlebars.runtime.js usr/share/javascript/handlebars.runtime
+dist/handlebars.runtime.js usr/share/javascript/handlebars.runtime
diff --git a/debian/patches/series b/debian/patches/series
index 316a4c4..179c343 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ use-global-tasks.patch
 remove-eslint.patch
 use-system-jison.patch
 port-to-babel6.patch
+use-babelrc-for-webpack.patch
diff --git a/debian/patches/use-babelrc-for-webpack.patch b/debian/patches/use-babelrc-for-webpack.patch
new file mode 100644
index 0000000..2cb01ba
--- /dev/null
+++ b/debian/patches/use-babelrc-for-webpack.patch
@@ -0,0 +1,10 @@
+--- /dev/null
++++ b/.babelrc
+@@ -0,0 +1,7 @@
++{
++  "presets": [
++    ["es2015", {
++      "loose": false,
++    }],
++  ],
++}
diff --git a/debian/rules b/debian/rules
index fd8a91a..a3e6ad0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,8 @@
 
 override_dh_auto_build:
 	grunt build --force
+	webpack --config debian/webpack.config.js lib/handlebars.js dist/handlebars.js --target=web --output-library=Handlebars --output-library-target=umd --module-bind 'js=babel-loader'
+	webpack --config debian/webpack.config.js lib/handlebars.runtime.js dist/handlebars.runtime.js --target=web --output-library=Handlebars --output-library-target=umd --module-bind 'js=babel-loader'
 
 override_dh_auto_clean:
 	rm -rf dist
diff --git a/debian/webpack.config.js b/debian/webpack.config.js
new file mode 100644
index 0000000..1f62b0e
--- /dev/null
+++ b/debian/webpack.config.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+var webpack = require('webpack');
+
+var config = {
+
+  resolve: {
+    modules: ['/usr/lib/nodejs'],
+  },
+
+  resolveLoader: {
+    modules: ['/usr/lib/nodejs'],
+  }
+}
+
+module.exports = config;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/libjs-handlebars.git



More information about the Pkg-javascript-commits mailing list