2016-01-26 43 views
6

TypeDocを使用してdocファイルを生成しようとしています。私はfollwingコマンドでTypeDocを実行すると:私はここに行方不明ですパラメータのいくつかの種類がありますTypeDocがAngular2モジュールを見つけることができません

Using TypeScript 1.6.2 from /development/node_modules/typedoc/node_modules/typescript/lib 
Error: /development/app/angular2/app.ts(1) 
Cannot find module 'angular2/core'. 
Error: /development/app/angular2/app.ts(2) 
Cannot find module 'angular2/upgrade'. 
Error: /development/app/angular2/app.ts(3) 
Cannot find module 'angular2/platform/browser'. 
Error: /development/app/angular2/app.ts(5) 

tsconfig.json

{ 
    "compilerOptions": { 
    "target": "ES5", 
    "module": "system", 
    "moduleResolution": "node", 
    "sourceMap": true, 
    "emitDecoratorMetadata": true, 
    "experimentalDecorators": true, 
    "removeComments": false, 
    "noImplicitAny": false 
    }, 
    "exclude": [ 
    "node_modules" 
    ] 
} 

/node_modules/.bin/typedoc --module system --target ES5 --exclude *.spec.ts* --experimentalDecorators --out typedoc app/ --ignoreCompilerErrors 

これは、出力として提供しますlibsファイルまたは.d.ts.ファイルを含めるには?

+0

を試してみてください。投稿できますか? –

+0

質問に私のtsconfig、jsonを追加しました –

答えて

1

私はangular2アプリケーションでtypedocを使用します。私はgulp-typedocを通して実行しますが、渡されるパラメーターは同じでなければなりません。次のgulpタスクは私にとって仕事をします:

​​

これは役に立ちます。

3

私はcommonjsモジュールで試してみました。

typedoc --experimentalDecorators --target 'es5' --module 'commonjs' --out doc-destination/ src/ 
0

あなたtsconfig.jsonでタイプ定義ファイルの設定を追加し、おそらくtsconfig.jsonに関連するいくつかの問題を

"typeRoots": [ 
    "node_modules/@types" ] 
関連する問題