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

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;