Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sane

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sane - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

src/cli.js

5

package.json
{
"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"

40

README.md

@@ -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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc