Ich habe eine gulp
Aufgabe, die meine Dateien nehmen und Dokumentation für sie erstellen soll. Die Aufgabe sieht folgendermaßen aus:TypeDoc erstellt leere Dokumentation
var gulp = require('gulp');
var gulptypedoc = require('gulp-typedoc');
gulp.task('typedoc-gamesmart', function() {
return gulp.src([
'./src/util/Config.ts',
'./src/util/Http.ts',
'./typings/crypto-js/crypto-js.d.ts',
'./src/gamesmart/GameSmart.ts',
'./src/gamesmart/apis/Client.ts',
'./src/gamesmart/apis/Data.ts',
'./src/gamesmart/apis/Game.ts',
'./src/gamesmart/apis/Score.ts',
'./src/gamesmart/apis/Store.ts',
'./src/gamesmart/apis/User.ts',
'./src/gamesmart/main.ts',
]).pipe(gulptypedoc({
// module: 'system',
target: 'es5',
out: 'docs/gamesmart/',
name: 'GameSmart SDK',
excludeNotExported: true,
mode: 'file',
version: true
}));
});
Wenn es abgeschlossen ist, bekomme ich leere Dokumente. Hier
ist ein Beispiel für die Klassenstruktur:
class Score extends GameSmart {
/**
* Saves a score for the game
*
* @param {number} score The score to be saved.
* @param {Function} callback The callback to run once complete.
* @returns
*/
public save(options: { score?: number } = {}, callback: Function = null, obj: Object = null): void {
if ((options.score || 0) <= 0) { return; }
this.makeRequest('/save', HttpMethod.Post, options, callback, obj);
}
}
Wie Sie sehen, ich bin nicht-Module verwenden, um die Dokumentation mode: 'file'
zu verwenden, sagt, so habe ich, und ich Ich bekomme nichts.
Wenn ich mode: 'modules'
verwenden, erhalte ich eine Liste der Klassen, aber keine Dokumentation:
Gibt es etwas, was ich falsch mache?
Sie exportieren Ihre 'Score' Klasse nicht, also sollte' excludeNotExported' 'false' statt' true' sein? –
Das sieht aus wie es das Problem behoben hat! Vielen Dank! –