Can't figure out to document angular with typescript
caseyhoward opened this issue · 2 comments
caseyhoward commented
I created a fork of a project that works for generating angular documentation. However, I need to be able to use typescript. I tried modifying it to make typescript work. It acts like it works (no errors in the console when building) but the documentation is blank. The repo is here: https://github.com/caseyhoward/angular-dgeni-seed
Help would greatly be appreciated.
tommck commented
I can't figure it out either. I really wish there was an official typescript example. I've been struggling with this on and off for weeks
chriscasola commented
I got it working by adding a factory like this:
.factory('tsngFileReader', function (jsdocFileReader) {
return {
name: 'tsngFileReader',
defaultPattern: /\.ts$/,
getDocs: jsdocFileReader.getDocs
};
})
And then adding the file reader:
.config(function (readFilesProcessor, writeFilesProcessor, log, tsngFileReader) {
// scrape .ts files for ngdoc comments
readFilesProcessor.fileReaders.push(tsngFileReader);
})