[Pkg-javascript-commits] [grunt] 01/01: add root variable to LoadTasks
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Sun Nov 13 17:31:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository grunt.
commit 157483f24d2be3e7e59b6a9b0a170c7a7510593e
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Sun Nov 13 23:01:06 2016 +0530
add root variable to LoadTasks
remove enconding conversion
---
debian/patches/add-root-variable.patch | 26 +++++++++++++++++++++++++
debian/patches/remove-encoding-conversion.patch | 18 +++++++++++++++++
debian/patches/series | 2 ++
3 files changed, 46 insertions(+)
diff --git a/debian/patches/add-root-variable.patch b/debian/patches/add-root-variable.patch
new file mode 100644
index 0000000..838a1d2
--- /dev/null
+++ b/debian/patches/add-root-variable.patch
@@ -0,0 +1,26 @@
+From bf6b918119d6fed82d4f674588f67eab394b6bf6 Mon Sep 17 00:00:00 2001
+From: Maurits Lamers <maurits at weidestraat.nl>
+Date: Sat, 9 Nov 2013 11:23:00 +0100
+Subject: [PATCH 1/2] adding option to define root where to load npm modules
+ from
+
+---
+ lib/grunt/task.js | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: grunt/lib/grunt/task.js
+===================================================================
+--- grunt.orig/lib/grunt/task.js
++++ grunt/lib/grunt/task.js
+@@ -370,9 +370,9 @@ task.loadTasks = function(tasksdir) {
+
+ // Load tasks and handlers from a given locally-installed Npm module (installed
+ // relative to the base dir).
+-task.loadNpmTasks = function(name) {
++task.loadNpmTasks = function(name, root) {
+ loadTasksMessage('"' + name + '" local Npm module');
+- var root = path.resolve('node_modules');
++ root = root || path.resolve('node_modules') || path.resolve('/usr/lib/nodejs');
+ var pkgfile = path.join(root, name, 'package.json');
+ var pkg = grunt.file.exists(pkgfile) ? grunt.file.readJSON(pkgfile) : {keywords: []};
+
diff --git a/debian/patches/remove-encoding-conversion.patch b/debian/patches/remove-encoding-conversion.patch
new file mode 100644
index 0000000..27403de
--- /dev/null
+++ b/debian/patches/remove-encoding-conversion.patch
@@ -0,0 +1,18 @@
+Index: grunt/lib/grunt/file.js
+===================================================================
+--- grunt.orig/lib/grunt/file.js
++++ grunt/lib/grunt/file.js
+@@ -223,11 +223,11 @@ file.read = function(filepath, options)
+ grunt.verbose.write('Reading ' + filepath + '...');
+ try {
+ contents = fs.readFileSync(String(filepath));
+- // If encoding is not explicitly null, convert from encoded buffer to a
++ /* // If encoding is not explicitly null, convert from encoded buffer to a
+ // string. If no encoding was specified, use the default.
+ if (options.encoding !== null) {
+ contents = iconv.decode(contents, options.encoding || file.defaultEncoding, {stripBOM: !file.preserveBOM});
+- }
++ }*/
+ grunt.verbose.ok();
+ return contents;
+ } catch (e) {
diff --git a/debian/patches/series b/debian/patches/series
index 0103795..0912358 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
fix-nodejs.patch
+add-root-variable.patch
+remove-encoding-conversion.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/grunt.git
More information about the Pkg-javascript-commits
mailing list