Skip to content

Commit

Permalink
minor change to task doc, open browser and forget
Browse files Browse the repository at this point in the history
* windows kinda weird with "explorer" command, returns status !=0 even
  though evertyhing went well.
* will probably ends up in just the display of url to open, no automatic
  browser opening
  • Loading branch information
mklabs committed Apr 23, 2012
1 parent 7c8c42b commit 0d1ecb0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/docs.js
Expand Up @@ -23,11 +23,11 @@ module.exports = function(grunt) {
var app = grunt.helper('serve', config);

app.on('start', function() {
var open = spawn(browser, ['http://localhost:' + config.port]);
open.on('error', function(er) { console.error(er); });
open.on('exit', function(code) {
if(code) grunt.warn('Something bad happend', code);
});
// spawn and forget, would probably ends up with no browser opening
// but output to console webserver url.
spawn(browser, ['http://localhost:' + config.port]);
// windows kinda werid on explorer, getting an error code even though everything is ok

});
});

Expand Down

0 comments on commit 0d1ecb0

Please sign in to comment.