[Pkg-javascript-commits] [node-module-deps] 120/444: allow relative options and argv in the command
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:47:48 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-module-deps.
commit 16db4a9787d238b9f46658d82b22d0f5033cb987
Author: James Halliday <mail at substack.net>
Date: Mon Jul 8 17:52:12 2013 -0700
allow relative options and argv in the command
---
cmd.js | 7 ++++++-
package.json | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/cmd.js b/cmd.js
index 25e3187..f9a4acb 100755
--- a/cmd.js
+++ b/cmd.js
@@ -1,8 +1,13 @@
#!/usr/bin/env node
var mdeps = require('./');
+var argv = require('minimist')(process.argv.slice(2));
var JSONStream = require('JSONStream');
var stringify = JSONStream.stringify();
stringify.pipe(process.stdout);
-mdeps(process.argv.slice(2)).pipe(stringify);
+var path = require('path');
+var files = argv._.map(function (file) {
+ return path.resolve(file);
+});
+mdeps(files, argv).pipe(stringify);
diff --git a/package.json b/package.json
index 948fce1..4203020 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,8 @@
"browser-resolve": "~1.1.0",
"resolve": "~0.4.0",
"detective": "~2.1.2",
- "concat-stream": "~1.0.0"
+ "concat-stream": "~1.0.0",
+ "minimist": "~0.0.1"
},
"devDependencies": {
"tap": "~0.4.0",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-module-deps.git
More information about the Pkg-javascript-commits
mailing list