Permalink
Browse files

* bugfixes : process.ARGV does not exist

* loose dependency with vows
  • Loading branch information...
1 parent fed8f19 commit dbe2f6b33db2a7ad063c592189f665d398005363 Julien Polo committed Jan 3, 2012
Showing with 12 additions and 7 deletions.
  1. +2 −2 bin/node-lint
  2. +3 −3 lib/lint/launcher.js
  3. +6 −1 lib/lint/vows.js
  4. +1 −1 package.json
View
@@ -14,7 +14,7 @@ var util = require(process.binding('natives').util ? 'util' : 'sys'),
//called as main executable
-var usage = "Usage: " + process.ARGV[0] + " file.js [dir1 file2 dir2 ...] [options]\n" +
+var usage = "Usage: " + process.argv[0] + " file.js [dir1 file2 dir2 ...] [options]\n" +
"Options:\n\n" +
" --config=FILE the path to a JSON file with JSLINT options\n" +
" --formatter=FILE optional path to a /dir/dir/file.hs file to customize the output\n" +
@@ -23,7 +23,7 @@ var usage = "Usage: " + process.ARGV[0] + " file.js [dir1 file2 dir2 ...] [optio
" --pretty enable pretty print for some format (XML, etc)\n" +
" -h, --help display this help and exit\n" +
" -v, --version output version information and exit",
- args = process.ARGV.splice(2), arg,
+ args = process.argv.splice(2), arg,
positionals = [],
options = {
formatter: {
@@ -415,21 +415,21 @@ exports.Launcher = Launcher;
/**
* Main
*/
-if (__filename === process.ARGV[1]) {
+if (__filename === process.argv[1]) {
var usage, args, arg, positionals, launcher, options, configFile;
//called as main executable
- usage = "Usage: " + process.ARGV[0] + " file.js [dir1 file2 dir2 ...] [options]\n" +
+ usage = "Usage: " + process.argv[0] + " file.js [dir1 file2 dir2 ...] [options]\n" +
"Options:\n\n" +
" --config=FILE the path to a JSON file with JSLINT options\n" +
" --formatter=FILE optional path to a /dir/dir/file.hs file to customize the output\n" +
" -h, --help display this help and exit\n" +
" -v, --version output version information and exit";
- args = process.ARGV.splice(2);
+ args = process.argv.splice(2);
positionals = [];
options = {
formatter: {
View
@@ -2,7 +2,12 @@
/**
* Imports
*/
-var vows = require('vows');
+try {
+ var vows = require('vows');
+} catch (e) {
+ console.info("vows cannot be found, extension is disabled");
+ return;
+}
var assert = require('assert');
var fs = require('fs');
View
@@ -1,7 +1,7 @@
{
"name": "lint",
"description": "This package provide lint validation library + node-lint command line tool allows you to check for problems using JSLint. You can specify your own --config file to use alternate JSLint options and your own --formatter file if you want to customize the generated output.",
- "version": "1.1.1-1",
+ "version": "1.1.2",
"homepage": "https://github.com/jpolo/node-lint",
"author": "tav <tav@espians.com> (http://tav.espians.com)",
"contributors": [

0 comments on commit dbe2f6b

Please sign in to comment.