[Pkg-javascript-commits] [libjs-handlebars] 01/01: use webpack from Gruntfile

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sun Dec 31 12:41:22 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 2debb2bd692e5d4651cf9b47a07b21eb7556b695
Author: Pirate Praveen <praveen at debian.org>
Date:   Sun Dec 31 18:10:53 2017 +0530

    use webpack from Gruntfile
---
 debian/patches/use-babelrc-for-webpack.patch | 36 ++++++++++++++++++++--------
 debian/rules                                 |  5 +---
 debian/webpack.config.js                     | 18 --------------
 3 files changed, 27 insertions(+), 32 deletions(-)

diff --git a/debian/patches/use-babelrc-for-webpack.patch b/debian/patches/use-babelrc-for-webpack.patch
index 2cb01ba..3628bc3 100644
--- a/debian/patches/use-babelrc-for-webpack.patch
+++ b/debian/patches/use-babelrc-for-webpack.patch
@@ -1,10 +1,26 @@
---- /dev/null
-+++ b/.babelrc
-@@ -0,0 +1,7 @@
-+{
-+  "presets": [
-+    ["es2015", {
-+      "loose": false,
-+    }],
-+  ],
-+}
+--- a/Gruntfile.js
++++ b/Gruntfile.js
+@@ -1,4 +1,7 @@
+ /* eslint-disable no-process-env */
++
++var path = require('path');
++
+ module.exports = function(grunt) {
+ 
+   function babelPreset(modules) {
+@@ -92,8 +95,14 @@
+             { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime&loose=es6.modules&auxiliaryCommentBefore=istanbul%20ignore%20next' }
+           ]
+         },
++        resolve: {
++          modules: ['/usr/lib/nodejs','.'],
++        },
++        resolveLoader: {
++          modules: ['/usr/lib/nodejs'],
++        },
+         output: {
+-          path: 'dist/',
++          path: path.resolve(__dirname, 'dist/'),
+           library: 'Handlebars',
+           libraryTarget: 'umd'
+         }
diff --git a/debian/rules b/debian/rules
index a3e6ad0..0d1905c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,10 +8,7 @@
 	dh $@ 
 
 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'
+	grunt build 
 
 override_dh_auto_clean:
 	rm -rf dist
-	rm -rf lib/handlebars/compiler/parser.js
diff --git a/debian/webpack.config.js b/debian/webpack.config.js
deleted file mode 100644
index 1f62b0e..0000000
--- a/debian/webpack.config.js
+++ /dev/null
@@ -1,18 +0,0 @@
-'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