root e2ef550dc3 update 2 年之前
..
opts e2ef550dc3 update 2 年之前
src e2ef550dc3 update 2 年之前
tag e2ef550dc3 update 2 年之前
tutorial e2ef550dc3 update 2 年之前
util e2ef550dc3 update 2 年之前
app.js e2ef550dc3 update 2 年之前
augment.js e2ef550dc3 update 2 年之前
borrow.js e2ef550dc3 update 2 年之前
config.js e2ef550dc3 update 2 年之前
doclet.js e2ef550dc3 update 2 年之前
env.js e2ef550dc3 update 2 年之前
fs.js e2ef550dc3 update 2 年之前
name.js e2ef550dc3 update 2 年之前
package.js e2ef550dc3 update 2 年之前
path.js e2ef550dc3 update 2 年之前
plugins.js e2ef550dc3 update 2 年之前
readme.js e2ef550dc3 update 2 年之前
schema.js e2ef550dc3 update 2 年之前
tag.js e2ef550dc3 update 2 年之前
template.js e2ef550dc3 update 2 年之前
tutorial.js e2ef550dc3 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;