docs: function generateBook(generator, book, options) {
      options = generator.Options(options);
      var state = generator.State? generator.State({}) : Immutable.Map();
      var start = Date.now();
  
      return Promise(
          new Output({
              book: book,
              options: options,
              state: state,
              generator: generator.name
          })
      )
  
      // Cleanup output folder
      .then(function(output) {
          var logger = output.getLogger();
          var rootFolder = output.getRoot();
  
          logger.debug.ln('cleanup folder "' + rootFolder + '"');
          return fs.ensureFolder(rootFolder)
              .thenResolve(output);
      })
  
      .then(processOutput.bind(null, generator))
  
      // Log duration and end message
      .then(function(output) {
          var logger = output.getLogger();
          var end = Date.now();
          var duration = (end - start)/1000;
  
          logger.info.ok('generation finished with success in ' + duration.toFixed(1) + 's !');
  
          return output;
      });
  }