2016-05-17 6 views
3

Angular2アプリケーション用のTypeScriptコードを文書化する必要がある人はいますか?ドキュメント化されたコードからドキュメントページを生成できるツールを探しています。Angular2 TypeScriptコードの文書化

私はTypeDocでやってみましたが、これまでのところうまく動作していないようで、多くのエラーが出ます。

これを経験したことがある人は、助言が役に立ちます。

更新:

私はTypeDocでドキュメントを生成しようとしています。

typedoc --experimentalDecorators --out 'doc/' 'app/' --excludeExternals --target 'es5' -module 'commonjs' 

は、ここで私が得るものです::

Using TypeScript 1.8.10 from /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/typescript/lib 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/attributedirectives/slide-ng-if.directive.ts(17) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/attributedirectives/slide-ng-if.directive.ts(20) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/attributedirectives/slide-ng-if.directive.ts(21) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/attributedirectives/slide-ng-if.directive.ts(22) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/dashboard.component.ts(88) 
Cannot find name 'IGridstackOptions'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/dashboard.component.ts(107) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/dashboard.component.ts(109) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/dashboard.component.ts(115) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/widgets/goalwidget.component.ts(3) 
Module '"/Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/models/goal"' has no exported member 'Unit'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/widgets/risk-score-widget.component.ts(2) 
Cannot find namespace 'moment'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/widgets/risk-score-widget.component.ts(54) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/widgets/risk-score-widget.component.ts(55) 
Cannot find name 'Chart'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/dashboard/widgets/risk-score-widget.component.ts(72) 
Cannot find name 'moment'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/gridstack/gridstack.component.ts(36) 
Cannot find name 'IGridstackOptions'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/gridstack/gridstack.component.ts(56) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/gridstack/gridstack.component.ts(58) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/navigation/sidebarmenu.component.ts(80) 
Property 'startsWith' does not exist on type 'string'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/components/user/role-selector.component.ts(34) 
Cannot find name 'jQuery'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/pipes/display-notation.pipe.ts(2) 
Module '"/Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/models/goal"' has no exported member 'Unit'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/pipes/moment.pipe.ts(5) 
Cannot find name 'moment'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/services/implementations/mock/mock-score-service.ts(2) 
Cannot find namespace 'moment'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/services/implementations/mock/mock-score-service.ts(14) 
Cannot find name 'moment'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/util/mobileDetector.ts(3) 
Cannot find name 'MobileDetect'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/app/util/mobileDetector.ts(6) 
Cannot find name 'MobileDetect'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/platform/browser.d.ts(77) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/application_ref.d.ts(38) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/application_ref.d.ts(92) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/application_ref.d.ts(151) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(22) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/change_detection/differs/default_keyvalue_differ.d.ts(24) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/di/reflective_provider.d.ts(102) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/di/reflective_provider.d.ts(102) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/linker/component_resolver.d.ts(7) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/linker/component_resolver.d.ts(11) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/linker/dynamic_component_loader.d.ts(58) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/linker/dynamic_component_loader.d.ts(99) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/linker/dynamic_component_loader.d.ts(104) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/core/linker/dynamic_component_loader.d.ts(105) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/async.d.ts(26) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/async.d.ts(27) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(0) 
Cannot find name 'MapConstructor'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(1) 
Cannot find name 'SetConstructor'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(3) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(3) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(6) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(7) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(10) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(11) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(13) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(14) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(99) 
Cannot find name 'Set'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(100) 
Cannot find name 'Set'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/collection.d.ts(101) 
Cannot find name 'Set'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/lang.d.ts(3) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/lang.d.ts(4) 
Cannot find name 'Set'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/lang.d.ts(70) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(1) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(7) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(8) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(9) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(9) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(10) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(10) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(11) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(11) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/facade/promise.d.ts(12) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/platform/browser/browser_adapter.d.ts(74) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/platform/dom/dom_adapter.d.ts(84) 
Cannot find name 'Map'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/directives/router_outlet.d.ts(26) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/directives/router_outlet.d.ts(32) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/directives/router_outlet.d.ts(37) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/directives/router_outlet.d.ts(46) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/directives/router_outlet.d.ts(57) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/instruction.d.ts(123) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/instruction.d.ts(147) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/instruction.d.ts(163) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/instruction.d.ts(166) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/interfaces.d.ts(20) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/interfaces.d.ts(38) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/interfaces.d.ts(56) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/interfaces.d.ts(79) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/interfaces.d.ts(101) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/lifecycle/lifecycle_annotations.d.ts(28) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/route_config/route_config_impl.d.ts(100) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/route_definition.d.ts(19) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/route_definition.d.ts(34) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/route_registry.d.ts(51) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(55) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(67) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(85) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(98) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(106) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(111) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(119) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(127) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(131) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(137) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/angular2/src/router/router.d.ts(145) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/CoreOperators.d.ts(34) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/CoreOperators.d.ts(49) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/CoreOperators.d.ts(88) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/CoreOperators.d.ts(93) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/CoreOperators.d.ts(93) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(45) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(46) 
Cannot find name 'Iterator'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(102) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(102) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(142) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(157) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(200) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(205) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/Observable.d.ts(205) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/observable/ForkJoinObservable.d.ts(5) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/observable/ForkJoinObservable.d.ts(6) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/observable/FromObservable.d.ts(6) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/observable/FromObservable.d.ts(6) 
Cannot find name 'Iterator'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/observable/PromiseObservable.d.ts(8) 
Cannot find name 'Promise'. 
Error: /Users/bertwillekens/Desktop/dashboard/src/main/webapp/WEB-INF/node_modules/rxjs/observable/PromiseObservable.d.ts(9) 
Cannot find name 'Promise'.  
+0

私はいくつかの詳細とポストを更新しました。ありがとう! –

+0

あなたはまずincludeDeclarationsで試してみることができますし、それが動作しない場合、少なくともいくつかの出力でignoreCompilerErrorsが動作するかどうかを確認してください。 –

+0

ignoreCompilerErrorsは何か変更されていますが、ドキュメントは生成されますが、空白はGlobalsという空のサブセクションを除きます。 includeDeclarationsは効果がないようです。 –

答えて

3

typedocを作成するためのがぶ飲みタスクの追加 これは私が実行しているコマンドです。

var gulp = require("gulp"), 
    typedoc = require("gulp-typedoc"); 

gulp.task("typedoc", function() { 
var srcTSFiles= [<All src Typescript files>]; 

return gulp 
    .src(srcTSFiles) 
    .pipe(typedoc({ 
     // TypeScript options (see typescript docs) 
     module: "commonjs", 
     target: "ES5", 
     includeDeclarations: true, 
     emitDecoratorMetadata: true, 
     experimentalDecorators: true, 

     // Output options (see typedoc docs) 
     out: "dist/doc", 
     json: "dist/to/file.json", 

     // TypeDoc options (see typedoc docs) 
     name: "project-name", 
     version: true, 
     noLib: true 
    })); 
    }); 

は、この情報がお役に立てば幸いです!

+1

'noLib'オプションはもうサポートされていないと思います。 'TypeError:未定義の 'フラグ'のプロパティを読み取れません – david

0

エラーの理由は、「moment」、「jQuery」などのライブラリの型定義は使用できません。型定義マネージャ( "https://www.npmjs.com/package/typings")から型定義をインストールして試すことができます。

型定義マネージャは定義にすべてのJavaScriptライブラリを入力していないので、その場合には、あなたは

typedoc以下のように、あなたのコマンドに「--ignoreCompilerErrors」を渡すことによってtypedocのコンパイルエラーを無視することができます - 'DOC /' 'アプリ/' --excludeExternals --target 'ES5' -module 'commonjs' --ignoreCompilerErrors

--out -experimentalDecoratorsそれはtypedoc.jsonにすべてのドキュメント生成の設定を移動するpreferrableだとドキュメントを生成するために同じファイルを使用すると、--jsonを使用できますファイルからコンフィギュレーションを選択するためのフラグ、以下 は

「typedoc --options ./typedoc.json --ignoreCompilerErrors ./src(typedoc.jsonがtypedoc構成ファイル)ファイルから設定を読み取るためのサンプル・コメントであります詳細情報については/ libに/」

私tsconfig.jsonファイルのサンプル

{ 
    "mode": "modules", 
    "out": "./dist/lib", 
    "json": "./dist/lib/api.json", 
    "theme": "default", 
    "experimentalDecorators": "true", 
    "emitDecoratorMetadata": "true", 
    "excludePrivate": "true", 
    "excludeExternals": "true", 
    "externalPattern":"./**.*!./src/**.*", 
    "includeDeclarations": "true", 
    "target": "es6", 
    "exclude": "**/+(*.spec.ts|*.scss|*.html|demo/**|node_modules/**/*.*|e2e/*.*|src/demo/**/*.*)", 
    "name": "ui-common-shared", 
    "moduleResolution": "node", 
    "preserveConstEnums": "true", 
    "stripInternal": "true", 
    "suppressExcessPropertyErrors": "true", 
    "suppressImplicitAnyIndexErrors": "true", 
    "module": "commonjs" 
} 

参照してください:https://github.com/angular/material2/blob/master/GENERATING_API_DOCS.md

関連する問題