[Pkg-javascript-commits] [grunt] 02/02: update patch

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Thu Nov 23 15:48:33 UTC 2017


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

praveen pushed a commit to branch master
in repository grunt.

commit f28d0f6e7750199696c6a97dbb2b0fde858bbc7b
Author: Pirate Praveen <praveen at debian.org>
Date:   Thu Nov 23 21:13:16 2017 +0530

    update patch
---
 debian/patches/add-root-variable.patch | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/debian/patches/add-root-variable.patch b/debian/patches/add-root-variable.patch
index 838a1d2..fcdf724 100644
--- a/debian/patches/add-root-variable.patch
+++ b/debian/patches/add-root-variable.patch
@@ -8,11 +8,17 @@ Subject: [PATCH 1/2] adding option to define root where to load npm modules
  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) {
+--- a/lib/grunt/task.js
++++ b/lib/grunt/task.js
+@@ -4,6 +4,7 @@
+ 
+ // Nodejs libs.
+ var path = require('path');
++var fs = require('fs');
+ 
+ // Extend generic "task" util lib.
+ var parent = grunt.util.task.create();
+@@ -370,9 +371,9 @@
  
  // Load tasks and handlers from a given locally-installed Npm module (installed
  // relative to the base dir).
@@ -20,7 +26,7 @@ Index: grunt/lib/grunt/task.js
 +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');
++  root = root || [ 'node_modules', '/usr/lib/nodejs'].map( v=> path.resolve(v) ).find(fs.existsSync);
    var pkgfile = path.join(root, name, 'package.json');
    var pkg = grunt.file.exists(pkgfile) ? grunt.file.readJSON(pkgfile) : {keywords: []};
  

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