Skip to content

Commit

Permalink
Verbose instruction for instrument.js
Browse files Browse the repository at this point in the history
More verbose description on syntaxt errors also when instrumenting a single file or folder
  • Loading branch information
piuccio committed Oct 20, 2012
1 parent ae5e06f commit 37d1c95
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions instrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var argv = require("optimist")
.options("i", {
"alias" : "ignore"
}).describe("i", "Ignore file or folder. This file/folder is copied in target folder but not instrumented. Path relative to the source folder")
.boolean("v").alias("v", "verbose").default("v", false)
.argv;


Expand Down Expand Up @@ -53,7 +54,8 @@ function instrumentFolder (source, destination, options) {
"condition" : options["condition"],
"doHighlight" : true,
"exclude" : options.exclude,
"ignore" : options.ignore
"ignore" : options.ignore,
"verbose" : options.verbose
});
} catch (ex) {
require("optimist").showHelp();
Expand All @@ -69,6 +71,7 @@ function instrumentFile (fileName, options) {
fileSystem.statFileOrFolder([fileName], "", callback, {
"function" : options["function"],
"condition" : options["condition"],
"doHighlight" : true
"doHighlight" : true,
"verbose" : options.verbose
});
};

0 comments on commit 37d1c95

Please sign in to comment.