jsdoc/lib/jsdoc/readme.js
Jeff Williams 8b26b6d669 remove author tags, and clean up JSDoc comments without leading asterisks
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.
2017-07-06 00:01:11 -07:00

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;