nikku / karma-browserify

A fast Browserify integration for Karma that handles large projects with ease
MIT License
321 stars 49 forks source link

Suppress missing watchify errors #181

Closed gaggle closed 8 years ago

gaggle commented 8 years ago

watchify is an optional dependency, but I always see errors due to bro.js:

try {
  watchify = require('watchify');
} catch (e) {
  console.error('watchify not found; install it via npm install --save-dev watchify');
  console.error('incremental rebuild will be disabled');
}

But a lack of watchify isn't an error for me. Would you consider a way to suppress them? Maybe something like watchify: false in karma conf?

nikku commented 8 years ago

Good point! I'd print the warning if the user uses watch: true without watchify installed only.

That would solve the issue, right?