arboleya / coffee-toaster

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

multimodule version includes toplevel classes more than once #21

Closed hems closed 12 years ago

arboleya commented 12 years ago

Actually all classes are being duplicated due to the individualized compilation process, of module by module. When one module links to another, things got really messy. :/

While I don't come up with a solution you can, maybe, set only your main module in the modules's array inside the 'toaster.coffee' file, and it should remove the duplicates.

In the multimodules example, this will do the trick:

# BUILD ROUTINES
build 'main'
       modules: ['app'] #, 'artists', 'genres']
       release: 'www/app.js'
       debug: 'www/app-debug.js'

But keep in mind that your main module must be your start-point, and everything else must be imported through it, otherwise will be left out.

hems commented 12 years ago

okie dokie, will let you know once i do my tests

arboleya commented 12 years ago

Solved in 0.5.5, try re-installing toaster and don't forget to check the new usage example with the 'toaster.coffee' differences. Older versions got (sadly) incompatible with this one.

arboleya commented 12 years ago

Forgot to mention, README updated: https://github.com/serpentem/coffee-toaster/

Examples removed, usage added: https://github.com/serpentem/coffee-toaster/tree/master/usage

hems commented 12 years ago

ah muleeeeeeeeeeeeeeeeki