Socket
Socket
Sign inDemoInstall

chokidar-cli

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chokidar-cli - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

10

package.json
{
"name": "chokidar-cli",
"description": "Ultra-fast cross-platform command line utility to watch file system changes.",
"version": "1.2.1",
"version": "1.2.2",
"keywords": [

@@ -33,6 +33,6 @@ "fs",

"dependencies": {
"bluebird": "3.5.1",
"chokidar": "2.0.4",
"lodash": "4.17.10",
"yargs": "12.0.1"
"bluebird": "3.5.3",
"chokidar": "2.1.1",
"lodash": "4.17.11",
"yargs": "12.0.5"
},

@@ -39,0 +39,0 @@ "devDependencies": {

@@ -38,6 +38,21 @@ # Chokidar CLI

Chokidar can be invoked using the `chokidar` command, without the `-cli` suffix.
Arguments use the form of runtime flags with string parameters, delimited by quotes. While in principal both single and double quotes are supported by `chokidar-cli`, the actual command line argument parsing is dependent on the operating system and shell used; for cross-platform compatibility, use double quotes (with escaping, if necessary), as single quotes are not universally supported by all operating systems.
This is particularly important when using chokidar-cli for run scripts specified in `package.json`. For maximum platform compatibility, make sure to use escaped double quotes around chokidar's parameters:
```
"run": {
"chokidar": "chokidar \"**/*.js\" -c \"...\"",
...
},
```
## Default behavior
By default `chokidar` streams changes for all patterns to stdout:
```bash
$ chokidar '**/*.js' '**/*.less'
$ chokidar "**/*.js" "**/*.less"
change:test/dir/a.js

@@ -54,3 +69,3 @@ change:test/dir/a.less

```bash
$ chokidar '**/*.js' '**/*.less' | cut -d ':' -f 2-
$ chokidar "**/*.js" "**/*.less" | cut -d ":" -f 2-
test/dir/a.js

@@ -64,11 +79,11 @@ test/dir/a.less

```chokidar '**/*.js' -c 'npm run build-js'```
```chokidar "**/*.js" -c "npm run build-js"```
**Watching in network directories must use polling**
```chokidar '**/*.less' -c 'npm run build-less' --polling```
```chokidar "**/*.less" -c "npm run build-less" --polling```
**Pass the path and event details in to your custom command**
```chokidar '**/*.less' -c 'if [ "{event}" = "change" ]; then npm run build-less -- {path}; fi;'```
```chokidar "**/*.less" -c "if [ '{event}' = 'change' ]; then npm run build-less -- {path}; fi;"```

@@ -75,0 +90,0 @@ **Detailed help**

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