Fix generation of JavaScript documentation using jsdoc git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/branches/fadams-javascript-binding@1624847 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/f1fc2503 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/f1fc2503 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/f1fc2503 Branch: refs/heads/master Commit: f1fc2503ca0365c52e90415c0891294fdf73be56 Parents: 530d9fd Author: fadams <fadams@unknown> Authored: Sun Sep 14 13:06:37 2014 +0000 Committer: fadams <fadams@unknown> Committed: Sun Sep 14 13:06:37 2014 +0000 ---------------------------------------------------------------------- proton-c/bindings/javascript/CMakeLists.txt | 4 +++- proton-c/bindings/javascript/binding.js | 23 +++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f1fc2503/proton-c/bindings/javascript/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/CMakeLists.txt b/proton-c/bindings/javascript/CMakeLists.txt index 02f9ccb..a92509a 100644 --- a/proton-c/bindings/javascript/CMakeLists.txt +++ b/proton-c/bindings/javascript/CMakeLists.txt @@ -254,7 +254,9 @@ add_custom_target( # If the docs target is specified and the jsdoc3 package for node.js has been # installed then build the JavaScript API documentation. if (NODE_JSDOC_FOUND) - message(STATUS "Documentation Enabled") + set(JSDOC_EXE ${PROJECT_SOURCE_DIR}/node_modules/.bin/jsdoc) + + message(STATUS "Documentation Enabled. Using ${JSDOC_EXE} to build JavaScript docs") add_custom_target(docs-js COMMAND ${JSDOC_EXE} -d ${CMAKE_CURRENT_BINARY_DIR}/html ${CMAKE_CURRENT_SOURCE_DIR}/binding.js) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/f1fc2503/proton-c/bindings/javascript/binding.js ---------------------------------------------------------------------- diff --git a/proton-c/bindings/javascript/binding.js b/proton-c/bindings/javascript/binding.js index 7e71b88..05e08a8 100644 --- a/proton-c/bindings/javascript/binding.js +++ b/proton-c/bindings/javascript/binding.js @@ -35,7 +35,7 @@ * be publicly visible from this package/module. We will use the associative * array form for declaring exported properties to prevent the Closure compiler * from minifying e.g. <pre>Module['Messenger'] = ...</pre> - * Exported Objects can be used in client code using the appropriate namespace: + * Exported Objects can be used in client code using a more convenient namespace, e.g.: * <pre> * proton = require('qpid-proton'); * var messenger = new proton.Messenger(); @@ -110,7 +110,7 @@ Module['Error'] = { * Constructs a proton.MessengerError instance. * @classdesc This class is a subclass of Error. * @constructor proton.MessengerError - * @param the error message. + * @param {string} message the error message. */ Module['MessengerError'] = function(message) { // MessengerError constructor. this.name = "MessengerError"; @@ -135,7 +135,7 @@ Module['MessengerError'].prototype.toString = function() { * Constructs a proton.MessageError instance. * @classdesc This class is a subclass of Error. * @constructor proton.MessageError - * @param the error message. + * @param {string} message the error message. */ Module['MessageError'] = function(message) { // MessageError constructor. this.name = "MessageError"; @@ -160,7 +160,7 @@ Module['MessageError'].prototype.toString = function() { * Constructs a proton.DataError instance. * @classdesc This class is a subclass of Error. * @constructor proton.DataError - * @param the error message. + * @param {string} message the error message. */ Module['DataError'] = function(message) { // DataError constructor. this.name = "DataError"; @@ -962,17 +962,16 @@ _Messenger_['rewrite'] = function(pattern, address) { /*****************************************************************************/ /** - * EventDispatch is a Singleton class that allows callbacks to be registered that + * EventDispatch is a Singleton class that allows callbacks to be registered which * will get triggered by the emscripten WebSocket network callbacks. Clients of * Messenger will register callbacks by calling: * <pre> - * messenger.on('work', <callback function>); + * messenger.on('work', <callback function>); * </pre> - * EventDispatch supports callback registration from multiple Messenger instances - * and supports multiple callbacks being registered for each instance. The client - * callbacks will actually be called when a given messenger has work available - * or a WebSocket close has been occurred (in which case all registered callbacks - * will be called). + * EventDispatch supports callback registration from multiple Messenger instances. + * The client callbacks will actually be called when a given messenger has work + * available or a WebSocket close has been occurred (in which case all registered + * callbacks will be called). * <p> * The approach implemented here allows the registered callbacks to follow a * similar pattern to _process_incoming and _process_outgoing in async.py @@ -1557,7 +1556,7 @@ _Message_['getUserID'] = function() { * even if a string or {@link proton.Data.Uuid} has been passed to setUserID. * @method setUserID * @memberof! proton.Message# - * @param {(string||proton.Data.Uuid)} id the new user id for the message. + * @param {(string|proton.Data.Uuid)} id the new user id for the message. */ _Message_['setUserID'] = function(id) { // If the id parameter is a proton.Data.Binary use it otherwise create a Binary --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
