Comparing version 0.2.9 to 0.2.10
27
cli.js
#!/usr/bin/env node | ||
"use strict"; | ||
require("console-dope"); | ||
var fs = require("fs"), | ||
@@ -9,15 +10,15 @@ Thing = require("nature").Thing, | ||
Glob = require("glob").Glob, | ||
w = require("wodge"), | ||
l = console.log; | ||
w = require("wodge"); | ||
function log(success, msg, error){ | ||
l( | ||
"%s %s %s", | ||
success ? w.green(w.symbol.tick) : w.red(w.symbol.cross), | ||
console.log( | ||
"%%%s{%s} %s %s", | ||
success ? "green" : "red", | ||
success ? w.symbol.tick : w.symbol.cross, | ||
msg, | ||
error ? "(" + w.red(error) + ")" : "" | ||
error ? "(%red{" + error + "})" : "" | ||
); | ||
} | ||
function logError(msg){ | ||
l(w.red(msg)); | ||
console.red.log(msg); | ||
} | ||
@@ -143,3 +144,3 @@ | ||
if (optionSet.help){ | ||
l(usage); | ||
console.log(usage); | ||
@@ -153,7 +154,7 @@ } else if (optionSet.name) { | ||
} else if (optionSet.list){ | ||
l(w.ansi("Preset list", "bold", "underline")); | ||
console.bold.underline.log("Preset list"); | ||
presets.list(function(list){ | ||
Object.keys(list).forEach(function(name){ | ||
var preset = list[name]; | ||
l(w.bold(name), preset.description, "[" + preset.user + "]"); | ||
console.log("%bold{%s} %s [%s]", name, preset.description, preset.user); | ||
if (optionSet.verbose){ | ||
@@ -163,3 +164,3 @@ delete preset.description; | ||
Object.keys(preset).forEach(function(option){ | ||
l(option + ":", preset[option]); | ||
console.log("%s: %s", option, preset[option]); | ||
}); | ||
@@ -178,3 +179,3 @@ } | ||
} else { | ||
l(usage); | ||
console.log(usage); | ||
} | ||
@@ -185,3 +186,3 @@ | ||
logError(optionSet.validationMessages.toString()); | ||
l(usage); | ||
console.log(usage); | ||
} | ||
@@ -188,0 +189,0 @@ |
{ | ||
"name": "renamer", | ||
"description": "Batch rename files and folders", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"bin": "cli.js", | ||
@@ -14,3 +14,4 @@ "repository": "https://github.com/75lb/renamer", | ||
"glob": "~3.2.6", | ||
"wodge": "~0.1.0" | ||
"wodge": "~0.3.0", | ||
"console-dope": "~0.2.1" | ||
}, | ||
@@ -17,0 +18,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25207
499
4
+ Addedconsole-dope@~0.2.1
+ Addedconsole-dope@0.2.2(transitive)
- Removedwodge@0.1.5(transitive)
Updatedwodge@~0.3.0