From 5a52ba4662a68465a1a0287e0363c34b62bd2bfb Mon Sep 17 00:00:00 2001 From: Zach Carter Date: Mon, 21 Nov 2011 20:19:34 -0500 Subject: [PATCH] change sys module to util --- Makefile | 4 ++++ lib/cli.js | 8 ++++---- package.json | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9b498a6..7136d08 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ build: mv jsonlint.js lib/jsonlint.js node scripts/bundle.js | uglifyjs > web/jsonlint.js +deploy: + cp web/jsonlint.js ../jsonlint-pages/jsonlint.js + cd ../jsolint-pages && git commit -a -m 'deploy site updates' && git push origin gh-pages + test: lib/jsonlint.js test/all-tests.js node test/all-tests.js diff --git a/lib/cli.js b/lib/cli.js index 640c5d2..b791de4 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -var sys = require("sys"); +var util = require("util"); var fs = require("fs"); var parser = require("./jsonlint").parser; var options = require("nomnom") @@ -41,7 +41,7 @@ function parse (source) { parser.parse(source); return JSON.stringify(parsed,null,options.indent); } catch (e) { - sys.puts(e); + util.puts(e); process.exit(1); } } @@ -54,7 +54,7 @@ function main (args) { if (options.inplace) { fs.writeSync(fs.openSync(path,'w+'), source, 0, "utf8"); } else { - sys.puts(source); + util.puts(source); } } else { var stdin = process.openStdin(); @@ -64,7 +64,7 @@ function main (args) { source += chunk.toString('utf8'); }); stdin.on('end', function () { - sys.puts(parse(source)); + util.puts(parse(source)); }); } } diff --git a/package.json b/package.json index 3cbbc19..027f3d4 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "lint", "jsonlint" ], - "version": "1.2.0", + "version": "1.2.1", "preferGlobal": true, "repository": { "type": "git", @@ -22,7 +22,7 @@ "jsonlint": "lib/cli.js" }, "engines": { - "node": "0.4 || 0.5 || 0.6" + "node": ">= 0.6" }, "dependencies": { "nomnom": ">= 0.4.3" @@ -36,4 +36,4 @@ "test": "node test/all-tests.js" }, "homepage": "http://zaach.github.com/jsonlint/" -} \ No newline at end of file +}