Comparing version 1.0.3 to 1.0.4
@@ -9,3 +9,4 @@ 'use strict'; | ||
const dlog = debug('find'); | ||
const dlog = debug('findjs:descendents'); | ||
P.promisifyAll(fs); | ||
@@ -12,0 +13,0 @@ |
{ | ||
"name": "findjs", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "walk a file hierarchy, returning files satisfying criteria", | ||
@@ -19,2 +19,3 @@ "main": "index.js", | ||
"bluebird": "3.3.4", | ||
"chalk": "^1.1.3", | ||
"commander": "2.9.0", | ||
@@ -21,0 +22,0 @@ "debug": "2.2.0", |
findjs | ||
------ | ||
TBD | ||
`findjs -- Walk a file hierarchy, listing or grepping matching files` | ||
`findjs` is a CLI tool modeled after the unix tools `FIND(1)` and `GREP(1)`. Like `find`, it can walk a file hierarchy and print to stdout the names of all files that satisfy some simple filters. `findjs` can also run `egrep` on each file. | ||
`findjs` can't do anything that can't be done with `find` and `grep`, but it has some simple defaults that make it more convenient for `node` development. Those defaults are: | ||
1. Return only javascript files, i.e files with the extension `.js`. | ||
2. Do not search within any `node_modules` directory. | ||
3. Do not search within any `.git` directory. | ||
These defaults can be overridden using the options `--file-match` and `--dir-match`. | ||
Examples | ||
-------- | ||
List all `.js` files under the current directory, but omitting the `.git` and `node_modules` directories: | ||
``` | ||
$ findjs | ||
index.js | ||
lib/descendents.js | ||
``` | ||
Grep all `.js` files under the current directory for a pattern: | ||
``` | ||
$ findjs -g exports | ||
index.js | ||
1:module.exports = require('./lib/descendents.js'); | ||
lib/descendents.js | ||
69:module.exports = { | ||
``` | ||
List all `.js` files containing a pattern (like `grep -l`): | ||
``` | ||
$ findjs -m function | ||
lib/descendents.js | ||
``` | ||
USAGE | ||
----- | ||
``` | ||
Usage: findjs [options] [path...] | ||
Walk a file hierarchy, listing or grepping matching files | ||
Options: | ||
-h, --help output usage information | ||
-f, --file-match [pattern] Include files that match pattern | ||
-d, --dir-match [pattern] Exclude directories matching pattern | ||
-g, --grep [pattern] Instead of listing files, grep each file for pattern | ||
-m, --match [pattern] Only list files which contain pattern (grep -l) | ||
``` |
Sorry, the diff of this file is not supported yet
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
6940
61
5
+ Addedchalk@^1.1.3
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)