node-query/node_modules/jsdoc/lib/jsdoc
2014-10-22 10:11:40 -04:00
..
opts Update npm modules 2014-10-22 10:11:40 -04:00
src Update npm modules 2014-10-22 10:11:40 -04:00
tag Update npm modules 2014-10-22 10:11:40 -04:00
tutorial Update npm modules 2014-10-22 10:11:40 -04:00
util Update npm modules 2014-10-22 10:11:40 -04:00
augment.js Update npm modules 2014-10-22 10:11:40 -04:00
borrow.js Update npm modules 2014-10-22 10:11:40 -04:00
config.js Update npm modules 2014-10-22 10:11:40 -04:00
doclet.js Update npm modules 2014-10-22 10:11:40 -04:00
fs.js Update npm modules 2014-10-22 10:11:40 -04:00
name.js Update npm modules 2014-10-22 10:11:40 -04:00
package.js Update npm modules 2014-10-22 10:11:40 -04:00
path.js Update npm modules 2014-10-22 10:11:40 -04:00
plugins.js Update npm modules 2014-10-22 10:11:40 -04:00
readme.js Update npm modules 2014-10-22 10:11:40 -04:00
schema.js Update npm modules 2014-10-22 10:11:40 -04:00
tag.js Update npm modules 2014-10-22 10:11:40 -04:00
template.js Update npm modules 2014-10-22 10:11:40 -04:00
tutorial.js Update npm modules 2014-10-22 10:11:40 -04:00

/*global env: true */

/**
 * Make the contents of a README file available to include in the output.
 * @module jsdoc/readme
 * @author Michael Mathews <micmath@gmail.com>
 * @author Ben Blank <ben.blank@gmail.com>
 */
'use strict';

var fs = require('jsdoc/fs'),
    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),
        parse = markdown.getParser();

    this.html = parse(content);
}

module.exports = ReadMe;