Skip to content

Latest commit

 

History

History
44 lines (24 loc) · 3.07 KB

README.md

File metadata and controls

44 lines (24 loc) · 3.07 KB

BlackBerry® WebWorks™ JavaScript API Documentation

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

Setting up your Environment

  1. Download the jsdoc-toolkit

  2. Extract the contents of the downloaded jsdoc zip file to a location on your machine <jsdoc-location>

  3. Download the contents of this WebWorks-APIDocs repository to a <webworks-apidocs-location> of your choice

  4. Copy the <webworks-apidocs-location>/build/BBTemplate directory from this repository to the <jsdoc-location>/jsdoc-toolkit/templates/BBTemplate directory

  5. Copy the <webworks-apidocs-location>/build/bbPlugin.js file from this repository to <jsdoc-location>/jsdoc-toolkit/app/plugins/bbPlugin.js

  6. 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

Building the Documentation

  1. Open a command prompt to your <jsdoc-location>/jsdoc-toolkit directory. This directory should contain jsrun.jar

  2. Type in the following command:

java -jar jsrun.jar app/run.js -a "<webworks-apidocs-location>/api" -t=templates/BBTemplate -d="<some-output-folder>"

Viewing the Documentation

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.

Additional Information

Cookbook

Coming soon: Jsdocs best practices standard for adding metadata tags

About the jsdoc-toolkit open source project

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