mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Most of the existing author tags are grossly out of date at this point. The definitive reference for who has contributed what is available at https://github.com/jsdoc3/jsdoc/graphs/contributors.
24 lines
526 B
JavaScript
24 lines
526 B
JavaScript
/**
|
|
* Make the contents of a README file available to include in the output.
|
|
* @module jsdoc/readme
|
|
*/
|
|
'use strict';
|
|
|
|
var env = require('jsdoc/env');
|
|
var fs = require('jsdoc/fs');
|
|
var markdown = require('jsdoc/util/markdown');
|
|
|
|
/**
|
|
* @class
|
|
* @classdesc Represents a README file.
|
|
* @param {string} path - The filepath to the README.
|
|
*/
|
|
function ReadMe(path) {
|
|
var content = fs.readFileSync(path, env.opts.encoding);
|
|
var parse = markdown.getParser();
|
|
|
|
this.html = parse(content);
|
|
}
|
|
|
|
module.exports = ReadMe;
|