
module.exports = function (mu) {

  // NAME - the name you wish to register the template under.
  // TEMPLATE - the name, path or static string template to use for the registration.
  // PARTIALS - string, array of strings, object of key value or multi arg of strings.
  // BEFORE_RENDER - callback passing TEMPLATE and done callback.
  // AFTER_RENDER - callback passing TEMPLATE.

  // Usage: mu.register(NAME, TEMPLATE)
  //          .partials('stirng', 'string')
  //          .beforeRender((template, done) => {  done(); })
  //          .afterRender((template) => {  // do something });

  /* Simple Register
  *******************************************/

  // Define name and associated template.
  // The first argument is the name you wish to register
  // this name will be used when calling:
  // mu generate <template> where <template> is
  // the registered name.

  // The second arg is the path to the template to
  // associate to your name or the name of a known
  // template (.tpl files are loaded automatically).
  // Known templates can be referenced by file name
  // without extension. Additionally a static template
  // string can be passed directly for inline
  // registrations.

  // mu.register('DB', 'service');

  /* Partials Register
  *******************************************/

  // Mustr supports partials as well. You could handle
  // partials manually in the callback (see advanced below)
  // however in most cases it's easiest to just pass
  // the logicless partials in your reigster command.
  // They will then be automatically rendered using your
  // front matter and/or flags passed in cli.

  // mu.register('Db', 'service').partials('author');

  // // OR

  // mu.register('Db', 'service').partials(['author', 'footer'])

  // // OR

  // mu.register('Db', 'service').partials('header', 'author', 'footer');

  /* Advanced Register
  *******************************************/

  // When registring with a callback the template can
  // be manipulated before rendering.
  // For even greater control of each step see
  // tests folder to see how you can build
  // each step and render manually.

  // mu.register('Db', 'service')
  //   .beforeRender((template, done) => {

  //     // do something with template
  //     // then call done to auto render.
  //     done();

  //   })
  //   .afterRender((template) => {

  //     // The file is rendered and written out.
  //     // Below is an example of manually calling
  //     // the .inject() method to inject for example
  //     // an import for the filed created.

  //     mu.inject('path/to/file', 'search expression', 'strategy', 'what to inject', () => {
  //       done();
  //     });

  //   });

};