diff --git a/lib/options.js b/lib/options.js index 639f3cf..0a0a0d5 100644 --- a/lib/options.js +++ b/lib/options.js @@ -15,15 +15,13 @@ var path = require('path'), run: true, quiet: false, exitOnFail: false - }, newPath, paths, a, p, t, v, concurrent, + }, newPath, paths, a, p, t, v, concurrent, globPattern, getPaths = function(opt) { var g = glob.sync(opt, { cwd: process.cwd() - }).map(function (filepath) { - return path.join(process.cwd(), filepath); }); if (g && g.length) { - options.paths = [].concat(options.paths, g); + options.paths = options.paths.concat(g); } }; @@ -94,6 +92,10 @@ var path = require('path'), throw('-p requires an argument'); } break; + case "-g": + globPattern = args.shift(); + getPaths(globPattern); + break; case "-f": case "--fail": options.exitOnFail = true; @@ -124,6 +126,7 @@ var path = require('path'), console.log(' as the list of files to process.'); console.log(' -p, --prefix String to prefix to all urls (for dynamic server names)'); console.log(' -S, --suffix String to add to the end of all urls (for dynamic server names)'); + console.log(' -g retrieve yui test files by a specified glob pattern'); console.log(' -o, --outfile '); console.log(' You can specify an export type with the following:'); console.log(' --tap TAP export (default)');