budo icon indicating copy to clipboard operation
budo copied to clipboard

Support arbitrary middleware

Open wbinnssmith opened this issue 9 years ago • 2 comments

Was playing around with budo-less and had the idea that budo could support any arbitrary middleware that followed a particular pattern (maybe like simple-less-middlewares), and would map that to a cli switch when budo is invoked.

I imagine budo doesn't want to get bogged down with heavy, convoluted configuration (see: webpack compared to browserify itself), but I could also see a usecase for two to three middlewares being all that's necessary to have a full-fledged dev server running within minutes without a ton of task runner or watcher configuration (see: gulp), etc.

wbinnssmith avatar Oct 14 '15 20:10 wbinnssmith

:+1: Definitely worth exploring. A plugin architecture would be cleaner than having budo-less, budo-sass, budo-styl, etc. It would just be aimed at common use cases.

Still, it's a bit of a balancing act, trying to avoid budo becoming a "framework" or monolithic Gulp/Grunt alternative.

mattdesl avatar Oct 14 '15 20:10 mattdesl

One idea that was suggested to me is to use --preset like babel is doing, to configure common browserify fields:

budo index --preset=react

Would be similar to:

budo index.js -- -t [ babelify --presets [ es2015 react ] ]

But it could also be used to configure budo itself, for example adding a new middleware with --preset=sass, using a different defaultIndex stream, etc.

mattdesl avatar Nov 09 '15 18:11 mattdesl