runonymous-grunt
Queue an anonymous function with grunt.task.run
. Often used to log or cleanup after delegating some work to another task via grunt.task.run('some:other:task')
.
grunt
Getting Started
Grunt ~0.4.1
You should be comfy with the grunt basics and npm so you can install this in your project
> npm install runonymous-grunt --save-dev
Here's an example where some extra logging helps us distinguish between similar targets
grunt;grunt; grunt
It's even cleaner in coffeescript:
require'runonymous-grunt'gruntgruntloadNpmTasks'grunt-contrib-jasmine' gruntregisterTask 'spec:shared, -> grunt.task.run( -> grunt.log.writeln('Testing shared code in the browser') 'jasmine:client' -> grunt.log.writeln('Testing shared code on the server') 'jasmine:server' )