chore(doc-gen): read `.es6` files as well as `.js` when generating docs

Closes #1429
This commit is contained in:
Peter Bacon Darwin 2015-04-18 08:35:38 +01:00
parent a00cb1de50
commit 376d508934
2 changed files with 3 additions and 1 deletions

View File

@ -60,6 +60,8 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
readFilesProcessor.sourceFiles = [
{ include: 'modules/*/*.js', basePath: 'modules' },
{ include: 'modules/*/src/**/*.js', basePath: 'modules' },
{ include: 'modules/*/*.es6', basePath: 'modules' },
{ include: 'modules/*/src/**/*.es6', basePath: 'modules' },
{ include: 'modules/*/docs/**/*.md', basePath: 'modules' },
{ include: 'docs/content/**/*.md', basePath: 'docs/content' }
];

View File

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