Skip to content

Commit

Permalink
[fixes qunitjs#121] chokidar -> sane
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 committed Jul 27, 2018
1 parent 64e8f24 commit 1f0190e
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 1f0190e

Please sign in to comment.