[Pkg-javascript-commits] [libjs-handlebars] 01/09: add patch to build with babel6

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Oct 23 11:27:36 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 4b3d8842779923d99d26b07ca5f510baa0bed32d
Author: Pirate Praveen <praveen at debian.org>
Date:   Mon Oct 23 15:00:37 2017 +0530

    add patch to build with babel6
---
 debian/patches/port-to-babel6.patch | 81 +++++++++++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 2 files changed, 82 insertions(+)

diff --git a/debian/patches/port-to-babel6.patch b/debian/patches/port-to-babel6.patch
new file mode 100644
index 0000000..bead319
--- /dev/null
+++ b/debian/patches/port-to-babel6.patch
@@ -0,0 +1,81 @@
+From 282236d8298b27f75c49e968fa8e4fa4f2f0a742 Mon Sep 17 00:00:00 2001
+From: Nils Knappmeier <github at knappi.org>
+Date: Sat, 21 Oct 2017 23:56:45 +0200
+Subject: [PATCH] Attempt to upgrade to babel 6
+
+- Extracted babelPreset as a function, because merging of options
+  in Grunt is shallow by default.
+- Some changes in the webpack-configuration are still required
+---
+ Gruntfile.js | 16 +++++++++++++---
+ package.json |  8 +++++---
+ 2 files changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/Gruntfile.js b/Gruntfile.js
+index ce85e9a4..a51b6a54 100644
+--- a/Gruntfile.js
++++ b/Gruntfile.js
+@@ -1,6 +1,17 @@
+ /* eslint-disable no-process-env */
+ module.exports = function(grunt) {
+ 
++  function babelPreset(modules) {
++    return [[
++      'env',
++      {
++        loose: true,
++        modules: modules
++      }
++    ]];
++  }
++
++
+   grunt.initConfig({
+     pkg: grunt.file.readJSON('package.json'),
+ 
+@@ -46,12 +57,11 @@ module.exports = function(grunt) {
+     babel: {
+       options: {
+         sourceMaps: 'inline',
+-        loose: ['es6.modules'],
+         auxiliaryCommentBefore: 'istanbul ignore next'
+       },
+       amd: {
+         options: {
+-          modules: 'amd'
++          presets: babelPreset('amd')
+         },
+         files: [{
+           expand: true,
+@@ -63,7 +73,7 @@ module.exports = function(grunt) {
+ 
+       cjs: {
+         options: {
+-          modules: 'common'
++          presets: babelPreset('commonjs')
+         },
+         files: [{
+           cwd: 'lib/',
+diff --git a/package.json b/package.json
+index b583ee34..2e26ca96 100644
+--- a/package.json
++++ b/package.json
+@@ -30,13 +30,15 @@
+   },
+   "devDependencies": {
+     "aws-sdk": "^2.1.49",
+-    "babel-loader": "^5.0.0",
+-    "babel-runtime": "^5.1.10",
++    "babel-core": "^6.26.0",
++    "babel-loader": "^6.4.1",
++    "babel-preset-env": "^1.6.1",
++    "babel-runtime": "^6.26.0",
+     "benchmark": "~1.0",
+     "dustjs-linkedin": "^2.0.2",
+     "eco": "~1.1.0-rc-3",
+     "grunt": "~0.4.1",
+-    "grunt-babel": "^5.0.0",
++    "grunt-babel": "^7.0.0",
+     "grunt-cli": "~0.1.10",
+     "grunt-contrib-clean": "0.x",
+     "grunt-contrib-concat": "0.x",
diff --git a/debian/patches/series b/debian/patches/series
index 07ad71b..316a4c4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 use-global-tasks.patch
 remove-eslint.patch
 use-system-jison.patch
+port-to-babel6.patch

-- 
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