Skip to content

Commit

Permalink
Merge pull request #238 from morishitter/rename-list-to-recursive
Browse files Browse the repository at this point in the history
rename --list option to --recursive
  • Loading branch information
Masaaki Morishita committed Nov 24, 2016
2 parents 81dd6a1 + f8ae54f commit 043783b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions bin/cli.js
Expand Up @@ -18,8 +18,7 @@ var argv = minimist(process.argv.slice(2), {
d: 'diff',
h: 'help',
i: 'ignore-path',
l: 'list',
R: 'recursive',
r: 'recursive',
v: 'version',
}
})
Expand All @@ -37,10 +36,10 @@ if (argv.h) {
console.log('')
console.log('Options:')
console.log('')
console.log(' -d, --diff Output diff against original file')
console.log(' -l, --list Format list of space seperated files(globs) in place')
console.log(' -c, --config Path to a specific configuration file (JSON, YAML, or CommonJS)')
console.log(' -b, --config-basedir Path to the directory that relative paths defining "extends"')
console.log(' -c, --config Path to a specific configuration file (JSON, YAML, or CommonJS)')
console.log(' -d, --diff Output diff against original file')
console.log(' -r, --recursive Format list of space seperated files(globs) in place')
console.log(' -v, --version Output the version number')
console.log(' -h, --help Output usage information')
console.log(' -i, --ignore-path Path to a file containing patterns that describe files to ignore.')
Expand All @@ -64,9 +63,9 @@ if (argv.i) {
options.ignorePath = argv.i
}

if (argv.l) {
if (argv.r) {
var globby = require('globby')
globby([argv.l].concat(argv._)).then(processMultipleFiles)
globby([argv.r].concat(argv._)).then(processMultipleFiles)
} else if (argv._[0]) {
var input = argv._[0]
var fullPath = path.resolve(process.cwd(), input)
Expand Down
2 changes: 1 addition & 1 deletion test/cli.js
Expand Up @@ -93,7 +93,7 @@ tape('cli stdin with diff option', function (t) {

tape('cli globs option', function (t) {
t.plan(1)
spawnStylefmt(['--list', 'test/recursive/**/*.css', '--diff'], null, function (err, output) {
spawnStylefmt(['--recursive', 'test/recursive/**/*.css', '--diff'], null, function (err, output) {
if (err) {
t.end(err)
return
Expand Down

0 comments on commit 043783b

Please sign in to comment.