jsoverson / grunt-open

Open urls and files from a grunt task
MIT License
110 stars 19 forks source link

Specify a callback as an option #24

Open pulkitsinghal opened 10 years ago

pulkitsinghal commented 10 years ago

What do you think about accepting a callback function as an option which can be called after grunt open is finished? Would you be open to adding it to this module?

pulkitsinghal commented 10 years ago

Or do most users find it sufficient to use the following input syntax?

path: function(){
  var openUrl = 'http://localhost:8080/myapp';
  console.log('Opening URL: ' + openUrl);
  return openUrl;
}
jsoverson commented 10 years ago

What is the use case?

Isn't this possible by registering a task and then just specifying that task after open?

grunt.registerTask('myfn', function() { console.log ('foo')});
grunt.registerTask('default', ['open', 'myfn']);