Comparing version 0.1.0 to 0.2.0
12
index.js
@@ -5,8 +5,16 @@ #!/usr/bin/env node | ||
var program = require("commander"); | ||
var packagejson = require("./package.json"); | ||
program | ||
.version("0.0.0") | ||
.version(packagejson.version) | ||
.option('-s, --spaces [amount]', 'Number of spaces for indentation') | ||
.usage("<file>") | ||
.parse(process.argv); | ||
var spaces = program.spaces; | ||
if (spaces === undefined) { | ||
spaces = "4"; | ||
} | ||
var spaces = parseInt(spaces); | ||
program.args.forEach(parse); | ||
@@ -17,4 +25,4 @@ | ||
eval("var js = " + str); | ||
var json = JSON.stringify(js, null, 4); | ||
var json = JSON.stringify(js, null, spaces); | ||
fs.writeFileSync(path, json); | ||
} |
{ | ||
"name": "json-fix", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1577
4
21
1
31