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;