root 3bf41bf355 update 2 лет назад
..
opts 3bf41bf355 update 2 лет назад
src 3bf41bf355 update 2 лет назад
tag 3bf41bf355 update 2 лет назад
tutorial 3bf41bf355 update 2 лет назад
util 3bf41bf355 update 2 лет назад
app.js 3bf41bf355 update 2 лет назад
augment.js 3bf41bf355 update 2 лет назад
borrow.js 3bf41bf355 update 2 лет назад
config.js 3bf41bf355 update 2 лет назад
doclet.js 3bf41bf355 update 2 лет назад
env.js 3bf41bf355 update 2 лет назад
fs.js 3bf41bf355 update 2 лет назад
name.js 3bf41bf355 update 2 лет назад
package.js 3bf41bf355 update 2 лет назад
path.js 3bf41bf355 update 2 лет назад
plugins.js 3bf41bf355 update 2 лет назад
readme.js 3bf41bf355 update 2 лет назад
schema.js 3bf41bf355 update 2 лет назад
tag.js 3bf41bf355 update 2 лет назад
template.js 3bf41bf355 update 2 лет назад
tutorial.js 3bf41bf355 update 2 лет назад

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;