I wasn´t really sure if I wanted to continue writing blog posts. Now I have finally decided to do so and have also realized what has stopped me until now: I invested way too much time in trying to publish well written and informative blog posts. I´m already spending enough time on developing, reading blogs and experimenting with new technologies. So from now on my posts will just be way shorter (and maybe full of typos). Let´s see how that goes.
Grunt is also really easy to extend by writing custom tasks. I have already written two myself: grunt-umd to surround code with the universal module definition and grunt-reznik to integrate reznik for AMD dependency analysis. There is also an official collection of contributed grunt tasks available here.
I bet you already thought this blog was dead because I didn´t come up with something new for quite a while. You were wrong, here I am again! Other than the previous posts about general stuff this one is more code related. It is about the testability of jquery DOM ready handlers.
A DOM ready handler is a function that is passed to jquery and executed as soon as the DOM is fully loaded (put simplified). If the DOM is already loaded by the time registering the handler, the function is executed immediately. You can read about the details of this mechanism here. In most cases such handlers are defined as anonymous functions: