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;