HenrikJoreteg / moonboots

A set of conventions and tools for bundle and serving clientside apps with node.js
159 stars 20 forks source link

Error handling and cleanup #5

Closed lukekarrys closed 10 years ago

lukekarrys commented 10 years ago

Added _bundleError which gets called when prepareBundle encounters an error. Now when encountering an error (only in developmentMode) result.source gets replaced with a document.write of the error. This is rather "in your face" but that's what I would (and do :smile:) want when in developmentMode. Rather than having to restart the process after looking at the thrown stack trace, the error gets presented to me in the browser and I can fix, save the file and refresh the browser and it will work.

Other minor changes