Code coverage report for master/lib/jsdoc/readme.js

Statements: 100% (8 / 8)      Branches: 100% (0 / 0)      Functions: 100% (1 / 1)      Lines: 100% (8 / 8)      Ignored: none     

All files » master/lib/jsdoc/ » readme.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                1 1 1             1 1 1   1     1  
/**
 * 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 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;