gruntjs/grunt-contrib-connect — pull request #29 by jaredstehler (2013-05-06 17:00:50+00:00)
Title: Emit grunt event when server has started

To provide support for writing tasks like 'jasmine-server':

grunt.registerTask('jasmine-server', 'start web server for jasmine tests in browser', function() {
grunt.task.run('jasmine:tests:build');

grunt.event.once('connect.tests.listening', function(host, port) {
var specRunnerUrl = 'http://' + host + ':' + port + '/_SpecRunner.html';
grunt.log.writeln('Jasmine specs available at: ' + specRunnerUrl);
require('open')(specRunnerUrl);
});

grunt.task.run('connect:tests:keepalive');
});