arboleya / coffee-toaster

Minimalist build system for CoffeeScript.
114 stars 23 forks source link

Multiple outputs? #24

Closed BrianGenisio closed 12 years ago

BrianGenisio commented 12 years ago

Have you considered having multiple outputs along with multiple watch folders?

For instance, I'd like to watch one set of folders and output my app.js file. I'd like to watch another set of folders and output my specs.js file. For obvious reasons, I'd like my specs to be separate from my actual app file.

Right now, I have two toaster configs and two instances of toaster running. Not a huge problem... but if I had one config, it would be cleaner.

arboleya commented 12 years ago

Yes, I use it to build Theoricus, take a look: https://github.com/serpentem/theoricus/blob/master/toaster.coffee

Basically you call "toast" as many times you want in your config file.

# toaster.coffee

toast 'my/src/folder'
    release: 'my/release/file.js'
    debug: 'my/release/file-debug.js'

toast 'my/another/src/folder'
    release: 'my/another/release/file.js'
    debug: 'my/another/release/file-debug.js'