[Pkg-javascript-commits] [node-grunt-contrib-uglify] 04/09: avoid the dependency on maxmin by providing a simple replacement

Paolo Greppi paolog-guest at moszumanska.debian.org
Wed Dec 21 07:06:28 UTC 2016


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

paolog-guest pushed a commit to branch master
in repository node-grunt-contrib-uglify.

commit 61128128858aaea24cb69b5c63ae4331a192f6b3
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Tue Dec 20 07:51:45 2016 +0000

    avoid the dependency on maxmin by providing a simple replacement
---
 debian/control                |  2 +-
 debian/patches/00-maxmin.diff | 32 ++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 12cb94e..4476334 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,7 @@ Depends:
  , node-lodash-packages
  , node-uglify (>= 2.7.0)
  , node-uri-path (>= 1.0.0)
- , node-maxmin (>= 1.1.0)
+ , node-bytes
 Description: Minify JavaScript files with UglifyJS
  FIX_ME long description
  .
diff --git a/debian/patches/00-maxmin.diff b/debian/patches/00-maxmin.diff
new file mode 100644
index 0000000..64945dd
--- /dev/null
+++ b/debian/patches/00-maxmin.diff
@@ -0,0 +1,32 @@
+Description: Avoid the dependency on maxmin by providing a simple
+ replacement.
+Forwarded: not-needed
+Author: Paolo Greppi <paolo.greppi at libpf.com>
+
+Index: node-grunt-contrib-uglify/tasks/uglify.js
+===================================================================
+--- node-grunt-contrib-uglify.orig/tasks/uglify.js
++++ node-grunt-contrib-uglify/tasks/uglify.js
+@@ -10,9 +10,21 @@
+ 
+ var path = require('path');
+ var chalk = require('chalk');
+-var maxmin = require('maxmin');
++var bytes = require('bytes');
+ var err;
+ 
++// replacement for maxmin
++// Copyright (c) Paolo Greppi 2016
++// MIT license
++// based on https://github.com/sindresorhus/maxmin/blob/master/index.js
++// - this is a real OS ! patch away figures
++// - use node-bytes rather than the unpackaged pretty-bytes
++// - skip gzip size
++function maxmin(max, min, useGzip) {
++  var ret = chalk.green(bytes(typeof max === 'number' ? max : max.length)) + ' → ' + chalk.green(bytes(typeof min === 'number' ? min : min.length));
++  return ret;
++}
++
+ // Return the relative path from file1 => file2
+ function relativePath(file1, file2) {
+   var file1Dirname = path.dirname(file1);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1d7a6c7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+00-maxmin.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-grunt-contrib-uglify.git



More information about the Pkg-javascript-commits mailing list