grunt-open icon indicating copy to clipboard operation
grunt-open copied to clipboard

Specify a callback as an option

Open pulkitsinghal opened this issue 10 years ago • 2 comments

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 avatar Sep 19 '14 15:09 pulkitsinghal

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;
}

pulkitsinghal avatar Sep 19 '14 15:09 pulkitsinghal

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']);

jsoverson avatar Sep 19 '14 16:09 jsoverson