{"size": 443, "ext": "js", "max_stars_repo_path": "loader/pug.js", "max_stars_repo_name": "vuedoc/vuedoc-parser", "max_stars_repo_stars_event_min_datetime": "2017-08-28T18:46:57.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-01T09:12:28.000Z", "max_issues_repo_path": "loader/pug.js", "max_issues_repo_name": "vuedoc/vuedoc-parser", "max_issues_repo_issues_event_min_datetime": "2017-08-26T22:20:25.000Z", "max_issues_repo_issues_event_max_datetime": "2018-06-14T03:55:51.000Z", "max_forks_repo_path": "loader/pug.js", "max_forks_repo_name": "vuedoc/vuedoc-parser", "max_forks_repo_forks_event_min_datetime": "2017-06-06T22:50:41.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-01T09:12:29.000Z"}
{"max_stars_count": 83, "max_issues_count": 26, "max_forks_count": 17, "avg_line_length": 22.15, "max_line_length": 72, "alphanum_fraction": 0.6726862302}
// eslint-disable-next-line import/no-unresolved
const pug = require('pug');
const Loader = require('../lib/Loader');

/**
 * @note Install the [pug](https://www.npmjs.com/package/pug) dependency
 */
class PugLoader extends Loader {
  load (source) {
    const outputText = pug.render(source, {
      compileDebug: false
    });

    // don't forget the return here
    return this.emitTemplate(outputText);
  }
}

module.exports = PugLoader;
