Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "sane", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Sane aims to be fast, small, and reliable file system watcher.", | ||
@@ -14,2 +14,3 @@ "main": "index.js", | ||
}, | ||
"bin": "./src/cli.js", | ||
"keywords": [ | ||
@@ -26,4 +27,6 @@ "watch", | ||
"dependencies": { | ||
"exec-sh": "^0.2.0", | ||
"fb-watchman": "0.0.0", | ||
"minimatch": "~0.2.14", | ||
"minimist": "^1.1.1", | ||
"walker": "~1.0.5", | ||
@@ -30,0 +33,0 @@ "watch": "~0.10.0" |
@@ -51,3 +51,3 @@ sane | ||
* `poll`: puts the watcher in polling mode. Under the hood that means `fs.watchFile`. | ||
* `watchman`: makes the watcher use [watchman](https://facebook.github.io/watchman/) | ||
* `watchman`: makes the watcher use [watchman](https://facebook.github.io/watchman/). | ||
* `dot`: enables watching files/directories that start with a dot. | ||
@@ -86,4 +86,42 @@ | ||
## CLI | ||
This module includes a simple command line interface, which you can install with `npm install sane -g`. | ||
``` | ||
Usage: sane <command> [...directory] [--glob=<filePattern>] [--poll] [--watchman] [--dot] [--wait=<seconds>] | ||
OPTIONS: | ||
--glob=<filePattern> | ||
A single string glob pattern or an array of them. | ||
--poll, -p | ||
Use polling mode. | ||
--watchman, -w | ||
Use watchman (if available). | ||
--dot, -d | ||
Enables watching files/directories that start with a dot. | ||
--wait=<seconds> | ||
Duration, in seconds, that watching will be disabled | ||
after running <command>. Setting this option will | ||
throttle calls to <command> for the specified duration. | ||
``` | ||
It will watch the given `directory` and run the given <command> every time a file changes. | ||
### CLI example usage | ||
- `sane 'echo "A command ran"'` | ||
- `sane 'echo "A command ran"' --glob='**/*.css'` | ||
- `sane 'echo "A command ran"' site/assets/css --glob='**/*.css'` | ||
- `sane 'echo "A command ran"' --wait=3` | ||
- `sane 'echo "A command ran"' -p` | ||
## License | ||
MIT | ||
## Credits | ||
The CLI was originally based on the [watch CLI](https://github.com/mikeal/watch). Watch is licensed under the Apache License Version 2.0. |
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
54330
13
1052
126
6
+ Addedexec-sh@^0.2.0
+ Addedminimist@^1.1.1
+ Addedexec-sh@0.2.2(transitive)
+ Addedmerge@1.2.1(transitive)
+ Addedminimist@1.2.8(transitive)