brunch/stylus-brunch — pull request #20 by pdufour (2013-04-26 05:12:16+00:00)
Title: Add a try/catch around cfg property creation

Fixes 'TypeError: Cannot read property 'stylus' of undefined' error.

This is the error I get now when I try to run brunch watch with the stylus-brunch plugin:
TypeError: Cannot read property 'stylus' of undefined
at new StylusCompiler (/node_modules/stylus-brunch/lib/index.js:44:44)
at /usr/local/lib/node_modules/brunch/lib/helpers.js:500:14
at Array.map (native)
at Object.exports.getPlugins (/usr/local/lib/node_modules/brunch/lib/helpers.js:499:8)
at /usr/local/lib/node_modules/brunch/lib/watch.js:175:25
at Object.exports.loadPackages (/usr/local/lib/node_modules/brunch/lib/helpers.js:493:12)
at initialize (/usr/local/lib/node_modules/brunch/lib/watch.js:167:20)
at new BrunchWatcher (/usr/local/lib/node_modules/brunch/lib/watch.js:254:7)
at module.exports.watch (/usr/local/lib/node_modules/brunch/lib/watch.js:292:12)
at ArgumentParser.parse (/usr/local/lib/node_modules/brunch/node_modules/argumentum/lib/argumentum.js:407:27)
at Object.exports.run (/usr/local/lib/node_modules/brunch/lib/cli.js:100:47)
at Object. (/usr/local/lib/node_modules/brunch/bin/brunch:7:32)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

It's throwing the error because config.plugins is not defined. I can't quite deduce why it is not defined. It should be created here:
https://github.com/britco/stylus-brunch/blob/master/lib/index.js#L40