Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Execute specified command on file change(s)
$ npm install [-g] big-eye
$ eye --help
Usage
$ eye <command>
Options
-w, --watch Files/directories to be watched [Default: pwd]
-i, --ignore Files/directories to be ignored [Default: from .gitignore]
-l, --lazy Don't execute command on startup
-d, --delay Debounce delay in ms between command executions [Default: 100]
-q, --quiet Print only command output
Examples
$ eye app.js
$ eye build.js -w src/
$ eye python module.py -i '*.pyc'
$ eye 'g++ main.cpp && ./a.out'
Tips
Run eye without arguments to execute the npm start script.
Execute file
with args
when a file matching the options.watch
array
gets modified. Returns a new Eye
instance.
Type: String
Absolute path to the file to be executed. Must be a non-empty String
.
Type: Array
Arguments that will be passed to child process when executing file
.
Type: Object
Options object that can take the following keys:
Type: Array
, String
Path(s) to files, dir(s) to be watched recursively, or glob pattern(s).
Type: anymatch compatible definition
Path(s) to files, dir(s) to be ignored, regex(es), or glob pattern(s).
Type: Boolean
Default: false
If set to true
, don't execute file
after constructing the instance, but
only on watched file change.
Type: Number
Default: 100
Delay in ms when debouncing execution after file changes.
Each Eye
instance inherits from EventEmitter
and emits a handful of events:
.on('executing', ref)
When a new child process is spawned. ref
is an instance of
child_process
.
on('changes', file)
Debounced file changes that trigger spawning a child process. file
is a path
to the file that caused the event.
.on('exited', time, code)
When a child has exited. time
is its execution time in
miliseconds, code
is its exit code.
.on('killed', signal)
When a child was killed due to file changes, signal
represents the signal
used to :knife: it.
MIT © nikersify
FAQs
Execute commands on file changes
We found that big-eye demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.