Angular use compodoc
Angular use compodoc
compodoc是一個用於產生 Angular 靜態網頁的工具
Angular 使用 compodoc 產生說明檔案
安裝compodoc
以 local 模式安裝
npm install --save-dev @compodoc/compodoc產生檔案
./node_modules/.bin/compodoc -p tsconfig.jsonRUN server
./node_modules/.bin/compodoc -s以global(全域) 模式安裝
npm install -g @compodoc/compodoc產生檔案
compodoc -p tsconfig.json啟用本地檔案網站
compodoc -p tsconfig.json -s使用 npx(推薦)
npx compodoc -p tsconfig.json -s -r 8888指令
- p : 表示 產生檔案
- s : 啟用檔案網站
jsDoc Tags
@Injectab()
export class HelloService{
constructor(){
}
/**
* Represents a hellWord.
* @param {string} UserName - The UserName of the hellWord.
* @param {string} age - The age of the hellWord.
*/
hellWord(UserName: string, age : string) {
}
}參考
Angular #10 Angular Documentation
Javascript檔案註解規則使用方式@use JSDoc - ucamc
你寫的檔案別人看得懂嗎?:compodoc | Jonny Huang 的學習筆記 (jonny-huang.github.io)