diff --git a/API.md b/API.md index 692a34723..97789082f 100644 --- a/API.md +++ b/API.md @@ -1,8 +1,12 @@ -Node-RED Modules ---- +Node-RED consists of 6 node modules under the `@node-red` scope, which are pulled together +by the top-level `node-red` module. The typical scenario is where you are embedding Node-RED into your +own application, in which case you would use the `node-red` module rather than any of the +internal modules directly. + +```javascript +let RED = require("node-red"); +``` -Node-RED provides a set of node modules that implement different parts of the -application. Module | Description -------|------- @@ -11,5 +15,5 @@ Module | Description [@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](@node-red_registry.html) | the internal node registry -@node-red/nodes | the default set of core nodes +@node-red/nodes | the default set of core nodes. This module only contains the Node-RED nodes - it does not expose any APIs. @node-red/editor-client | the client-side resources of the Node-RED editor application diff --git a/Gruntfile.js b/Gruntfile.js index c52f05115..3cecfccd4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -40,8 +40,10 @@ module.exports = function(grunt) { if (nonHeadless) { process.env.NODE_RED_NON_HEADLESS = true; } + const pkg = grunt.file.readJSON('package.json'); + process.env.NODE_RED_PACKAGE_VERSION = pkg.version; grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), + pkg: pkg, paths: { dist: ".dist" },