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

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;