chore(doc-gen): include TypeScript files in the doc generation

This commit is contained in:
Peter Bacon Darwin 2015-05-07 10:26:23 +01:00
parent c509057f65
commit e30ad2ec2c
2 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,7 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
// Configure the log service
.config(function(log) {
log.level = 'warning';
log.level = 'warn';
})
@ -62,6 +62,8 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
{ include: 'modules/*/src/**/*.js', basePath: 'modules' },
{ include: 'modules/*/*.es6', basePath: 'modules' },
{ include: 'modules/*/src/**/*.es6', basePath: 'modules' },
{ include: 'modules/*/*.ts', basePath: 'modules' },
{ include: 'modules/*/src/**/*.ts', basePath: 'modules' },
{ include: 'modules/*/docs/**/*.md', basePath: 'modules' },
{ include: 'docs/content/**/*.md', basePath: 'docs/content' }
];

View File

@ -10,9 +10,8 @@ var path = require('canonical-path');
module.exports = function atScriptFileReader(log, atParser, modules) {
var reader = {
name: 'atScriptFileReader',
defaultPattern: /\.js|\.es6$/,
defaultPattern: /\.js|\.es6|\.ts$/,
getDocs: function(fileInfo) {
var moduleDoc = atParser.parseModule(fileInfo);
moduleDoc.docType = 'module';
moduleDoc.id = moduleDoc.moduleTree.moduleName;