(sourceFiles, encoding)
| 226 | } |
| 227 | |
| 228 | function generateSourceFiles(sourceFiles, encoding) { |
| 229 | encoding = encoding || 'utf8'; |
| 230 | Object.keys(sourceFiles).forEach(function(file) { |
| 231 | var source; |
| 232 | // links are keyed to the shortened path in each doclet's `meta.shortpath` property |
| 233 | var sourceOutfile = helper.getUniqueFilename(sourceFiles[file].shortened); |
| 234 | helper.registerLink(sourceFiles[file].shortened, sourceOutfile); |
| 235 | |
| 236 | try { |
| 237 | source = { |
| 238 | kind: 'source', |
| 239 | code: helper.htmlsafe( fs.readFileSync(sourceFiles[file].resolved, encoding) ) |
| 240 | }; |
| 241 | } |
| 242 | catch(e) { |
| 243 | logger.error('Error while generating source file %s: %s', file, e.message); |
| 244 | } |
| 245 | |
| 246 | generate('Source: ' + sourceFiles[file].shortened, [source], sourceOutfile, |
| 247 | false); |
| 248 | }); |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * Look for classes or functions with the same name as modules (which indicates that the module |
no test coverage detected
searching dependent graphs…