UiModule

UiModule

The main entry-point for the Adapt authoring tool web-app/front-end

Constructor

new UiModule()

Source:

Extends

  • AbstractModule

Members

appRoot :String

Source:
Source code directory for the app
Type:
  • String

buildDir :String

Source:
Build code directory for the app
Type:
  • String

isProduction

Source:
Cached reference to isProduction config value

postBuildHook :Hook

Source:
Invoked after every UI build
Type:
  • Hook

preBuildHook :Hook

Source:
Invoked before every UI build
Type:
  • Hook

srcDir :String

Source:
Source code directory for the app
Type:
  • String

uiPlugins :Array.<String>

Source:
Reference to UI plugins which need to be included in build
Type:
  • Array.<String>

Methods

addUiPlugin(dir)

Source:
Copies a plugin to be built into the UI
Parameters:
Name Type Description
dir String Directory to add (can contain nested plugins)

(async) build() → {Promise}

Source:
Builds the front-end application
Returns:
Type
Promise

(async) init()

Source:

servePage(pageName) → {function}

Source:
Serves a static HTML page
Parameters:
Name Type Description
pageName String
Returns:
Express handler function
Type
function