Skip to content

Commit

Permalink
CLI: [fixes #121] chokidar -> sane (#1283)
Browse files Browse the repository at this point in the history
I think chokidar is great, but the ergonomics around native dependencies today in node really painful. Although chokidar pre-builds, users switching nodes, or failed pre-build downloads, or behind firewall usages cause a fallback to requiring a working compiler toolchain. Requiring that, very much increases the barrier of entry, and support load for tooling/cli maintainers
  • Loading branch information
stefanpenner authored and trentmwillis committed Jul 30, 2018
1 parent 5fbaa48 commit 9af0448
Show file tree
Hide file tree
Showing 4 changed files with 7,082 additions and 610 deletions.
10 changes: 5 additions & 5 deletions bin/run.js
Expand Up @@ -151,18 +151,18 @@ function watcherEvent( event, args ) {
}

run.watch = function watch() {
const chokidar = require( "chokidar" );
const sane = require( "sane" );
const args = Array.prototype.slice.call( arguments );

const watcher = chokidar.watch( "**/*.js", {
ignored: IGNORED_GLOBS,
ignoreInitial: true
const watcher = sane( process.cwd(), {
globs: [ "**/*.js" ],
ignored: IGNORED_GLOBS
} );

watcher.on( "ready", () => run.apply( null, args ) );
watcher.on( "change", watcherEvent( "changed", args ) );
watcher.on( "add", watcherEvent( "added", args ) );
watcher.on( "unlink", watcherEvent( "removed", args ) );
watcher.on( "delete", watcherEvent( "removed", args ) );

function stop() {
console.log( "Stopping QUnit..." );
Expand Down

0 comments on commit 9af0448

Please sign in to comment.