This repository contains all of the BlackBerry WebWorks API documentation source as well as the build templates to transform the content into HTML documentation. The documentation source format is based on the jsdoc-toolkit open source project.
This project is Open Sourced under the Apache 2.0 license
Read more about the BlackBerry WebWorks open source project
Build scripts for windows and Mac are located at build/genDoc.bat and build/genDoc.
-
Download the jsdoc-toolkit
-
Extract the contents of the downloaded jsdoc zip file to a location on your machine <jsdoc-location>
-
Download the contents of this WebWorks-APIDocs repository to a <webworks-apidocs-location> of your choice
-
Copy the <webworks-apidocs-location>/build/BBTemplate directory from this repository to the <jsdoc-location>/jsdoc-toolkit/templates/BBTemplate directory
-
Copy the <webworks-apidocs-location>/build/bbPlugin.js file from this repository to <jsdoc-location>/jsdoc-toolkit/app/plugins/bbPlugin.js
-
If you don't already have one, download and configure a [Java Runtime Environment] (http://www.oracle.com/technetwork/java/javase/downloads/index.html) on your machine
-
Open a command prompt to your <jsdoc-location>/jsdoc-toolkit directory. This directory should contain jsrun.jar
-
Type in the following command:
java -jar jsrun.jar app/run.js -a "<webworks-apidocs-location>/api" -t=templates/BBTemplate -d="<some-output-folder>"
After you have generated the documentation you will find all the HTML for the API docs in your <some-output-folder>. The default main page is index.html. Some browsers don't like viewing content from a file:// uri that contains JavaScript. In-fact, typically only Firefox allows this by default. If your default browser isn't Firefox, don't be surprised when you double click the file and it doesn't display properly in your browser!
If you copy the contents of your <some-output-folder> to a local web server you can then view the content in a browser of your choice. But if you are viewing it directly from your file system, you will need to use Firefox or find a way to configure your browser of choice to allow JavaScript on content from the file:// origin.
Coming soon: Jsdocs best practices standard for adding metadata tags
JsDoc Toolkit is an application used to document JavaScript interfaces and automatically generate template-formatted HTML documentation from commented JavaScript source code. It's similar to JavaDoc, where you can use tags like @param to document your APIs.
If you wish to read more information, or find out about more available tag references, please visit this link