From 0e945e465d7df01556c84a2bc511f9cd0489d1f3 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Sat, 4 Jul 2015 08:47:13 +0100 Subject: [PATCH] chore(doc-gen): stop crash in `gulp public_docs` This change prevents the doc generation from crashing due to a missing module, but perhaps we need to think of a way of being able to generate the angular.d.ts file correctly in `gulp public_docs`, perhaps by removing the need for angular2/angular2.api --- docs/dgeni-package/processors/createTypeDefinitionFile.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/dgeni-package/processors/createTypeDefinitionFile.js b/docs/dgeni-package/processors/createTypeDefinitionFile.js index f0a90efb56..67cdd94c76 100644 --- a/docs/dgeni-package/processors/createTypeDefinitionFile.js +++ b/docs/dgeni-package/processors/createTypeDefinitionFile.js @@ -66,12 +66,13 @@ module.exports = function createTypeDefinitionFile(log) { _.forEach(doc.moduleDocs, function(modDoc, alias) { if (!modDoc.doc) { log.error('createTypeDefinitionFile processor: no such module "' + alias + '" (Did you forget to add it to the modules to load?)'); + doc = null; } }); + if (doc) { + docs.push(doc); + } }); - - // Add all the type definition docs to the docs collection so that dgeni can process them - return docs.concat(typeDefDocs); } }; };