This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
big-eye with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
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.
args when a file matching the
gets modified. Returns a new
Absolute path to the file to be executed. Must be a non-empty
Arguments that will be passed to child process when executing
Options object that can take the following keys:
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).
If set to
true, don't execute
file after constructing the instance, but
only on watched file change.
Delay in ms when debouncing execution after file changes.
Eye instance inherits from
EventEmitter and emits a handful of events:
When a new child process is spawned.
ref is an instance of
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
code is its exit code.
When a child was killed due to file changes,
signal represents the signal
used to :knife: it.
MIT © nikersify