1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add api docs landing content

This commit is contained in:
Nick O'Leary 2019-02-28 22:21:22 +00:00
parent e7f54f005c
commit 236d437430
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
5 changed files with 29 additions and 5 deletions

15
API.md Normal file
View File

@ -0,0 +1,15 @@
Node-RED Modules
---
Node-RED provides a set of node modules that implement different parts of the
application.
Module | Description
-------|-------
[node-red](node-red.html) | the main module that pulls together all of the internal modules and provides the executable version of Node-RED
[@node-red/editor-api](@node-red_editor-api.html) | an Express application that serves the Node-RED editor and provides the Admin HTTP API
[@node-red/runtime](@node-red_runtime.html) | the core runtime of Node-RED
[@node-red/util](@node-red_util.html) | common utilities for the Node-RED runtime and editor modules
@node-red/registry | the internal node registry
@node-red/nodes | the default set of core nodes
@node-red/editor-client | the client-side resources of the Node-RED editor application

View File

@ -438,6 +438,7 @@ module.exports = function(grunt) {
jsdoc : { jsdoc : {
modules: { modules: {
src: [ src: [
'API.md',
'packages/node_modules/node-red/lib/red.js', 'packages/node_modules/node-red/lib/red.js',
'packages/node_modules/@node-red/runtime/lib/index.js', 'packages/node_modules/@node-red/runtime/lib/index.js',
'packages/node_modules/@node-red/runtime/lib/api/*.js', 'packages/node_modules/@node-red/runtime/lib/api/*.js',
@ -451,7 +452,7 @@ module.exports = function(grunt) {
configure: './jsdoc.json' configure: './jsdoc.json'
} }
}, },
editor: { _editor: {
src: [ src: [
'packages/node_modules/@node-red/editor-client/src/js' 'packages/node_modules/@node-red/editor-client/src/js'
], ],
@ -612,5 +613,5 @@ module.exports = function(grunt) {
grunt.registerTask('docs', grunt.registerTask('docs',
'Generates API documentation', 'Generates API documentation',
['jsdoc','jsdoc2md']); ['jsdoc']);
}; };

View File

@ -20,6 +20,7 @@
*/ */
/** /**
* A WebSocket connection between the runtime and the editor.
* @typedef CommsConnection * @typedef CommsConnection
* @type {object} * @type {object}
* @property {string} session - a unique session identifier * @property {string} session - a unique session identifier

View File

@ -413,7 +413,7 @@ function setObjectProperty(msg,prop,value,createMissing) {
} }
} }
/** /*!
* Get value of environment variable. * Get value of environment variable.
* @param {Node} node - accessing node * @param {Node} node - accessing node
* @param {String} name - name of variable * @param {String} name - name of variable

View File

@ -39,6 +39,9 @@ function checkVersion(userSettings) {
* This module provides the full Node-RED application, with both the runtime * This module provides the full Node-RED application, with both the runtime
* and editor components built in. * and editor components built in.
* *
* The API this module exposes allows it to be embedded within another node.js
* application.
*
* @namespace node-red * @namespace node-red
*/ */
module.exports = { module.exports = {
@ -125,7 +128,11 @@ module.exports = {
/** /**
* This provides access to the internal nodes module of the * This provides access to the internal nodes module of the
* runtime. * runtime. The details of this API remain undocumented as they should not
* be used directly.
*
* Most administrative actions should be performed use the runtime api
* under [node-red.runtime]{@link node-red.runtime}.
* *
* @memberof node-red * @memberof node-red
*/ */