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 Jun 6, 2018
1 parent b017c01 commit a6dace7
Show file tree
Hide file tree
Showing 3 changed files with 334 additions and 355 deletions.
9 changes: 4 additions & 5 deletions bin/run.js
Expand Up @@ -151,18 +151,17 @@ 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( "**/*.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
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -31,12 +31,12 @@
"LICENSE.txt"
],
"dependencies": {
"chokidar": "1.7.0",
"commander": "2.12.2",
"exists-stat": "1.0.0",
"findup-sync": "2.0.0",
"js-reporters": "1.2.1",
"resolve": "1.5.0",
"sane": "^2.5.2",
"walk-sync": "0.3.2"
},
"devDependencies": {
Expand Down

0 comments on commit a6dace7

Please sign in to comment.