# YUIDOC javascript doc 여러가지 중에서 YUIDOC을 잠깐 사용해 보았습니다. # 설치 ## node.js 설치 node.js 를 설치합니다. ''http://nodejs.org/#download'' 에서 인스톨러를 다운받아서 설치합니다. ## yuidocjs 설치 yuidocjs 를 설치합니다. 커맨드창에서 ''npm -g install yuidocjs'' 명령어로 yuidocjs 를 설치합니다. # 실행 ## yuidoc.json 생성 프로젝트 홈경로에 ''yuidoc.json'' 파일을 생성합니다. ```javascript { "name": "The Foo API", "description": "The Foo API: a library for doing X, Y, and Z", "version": "1.2.1", "url": "http://example.com/", "options": { "outdir": "../build/apidocs" } } ``` 기본적인 프로젝트 정보들을 json 형태로 입력합니다. ```js { "name": "MAP API", "description": "MAP API: a library for using MAP control", "version": "1.0.0", "options": { "exclude" : "arcgis_js", "paths": "./WebContent/js", "outdir": "./WebContent/apidocs" } } ``` 제외할 디렉토리를 ''exclude''로 넣고, 소스 경로를 ''paths''로 넣고, 출력할 곳으로 ''outdir''을 넣었습니다. 옵션은 ''http://yui.github.io/yuidoc/args/'' 에서 확인할 수 있습니다. ## yuidoc 실행 커맨드 창에서 ''yuidoc .'' 입력하여 yuidoc을 실행합니다. # Ant Build ''cmd''를 통하여 위와 같이 실행되도록 스크립트를 작성합니다. 다른 작업과 depends 로 연결합니다. ```xml ``` # 작성 문법 # REF * http://www.remwebdevelopment.com/blog/javascript/notes-on-yui-doc-46.html * http://yui.github.io/yuidoc/ * http://yui.github.io/yuidoc/args/ * http://stackoverflow.com/questions/1800853/is-there-any-similar-javadocs-script-tool-for-javascript-files