How to run some package code before Meteor serves anything?

Is there a way to write a package that can do some stuff before Meteor starts serving the application? Some type of hooks perhaps? For example, to get my idea across:

// some:package that is installed in the app

Meteor.beforeServe(function() {
  // do something before anything is served.
  // For example, compile something in the public folder.
  // Once this is done running, then Meteor will output the familiar:
  // => Started your app.
  // => App running at: http://localhost:3000/