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

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;