root 3bf41bf355 update 2 anni fa
..
opts 3bf41bf355 update 2 anni fa
src 3bf41bf355 update 2 anni fa
tag 3bf41bf355 update 2 anni fa
tutorial 3bf41bf355 update 2 anni fa
util 3bf41bf355 update 2 anni fa
app.js 3bf41bf355 update 2 anni fa
augment.js 3bf41bf355 update 2 anni fa
borrow.js 3bf41bf355 update 2 anni fa
config.js 3bf41bf355 update 2 anni fa
doclet.js 3bf41bf355 update 2 anni fa
env.js 3bf41bf355 update 2 anni fa
fs.js 3bf41bf355 update 2 anni fa
name.js 3bf41bf355 update 2 anni fa
package.js 3bf41bf355 update 2 anni fa
path.js 3bf41bf355 update 2 anni fa
plugins.js 3bf41bf355 update 2 anni fa
readme.js 3bf41bf355 update 2 anni fa
schema.js 3bf41bf355 update 2 anni fa
tag.js 3bf41bf355 update 2 anni fa
template.js 3bf41bf355 update 2 anni fa
tutorial.js 3bf41bf355 update 2 anni fa

readme.js

/**
* Make the contents of a README file available to include in the output.
* @module jsdoc/readme
*/
const env = require('jsdoc/env');
const fs = require('jsdoc/fs');
const markdown = require('jsdoc/util/markdown');

/**
* Represents a README file.
*/
class ReadMe {
/**
* @param {string} path - The filepath to the README.
*/
constructor(path) {
const content = fs.readFileSync(path, env.opts.encoding);
const parse = markdown.getParser();

this.html = parse(content);
}
}

module.exports = ReadMe;