Constructor
new UiBuild(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Whether this is a development build
Properties
Name |
Type |
Description |
status |
string
|
Build status |
isDev |
boolean
|
Whether this is a development build |
appRoot |
string
|
Root dir for the main adapt-authoring app |
srcDir |
string
|
Root dir for the UI source code |
buildDir |
string
|
Build dir for the output files |
plugins |
array
|
Any custom UI plugins |
|
Members
(static) BUILD_STATUS :object
- Description:
- Constants for build status
- Source:
Constants for build status
Type:
(static) rebuildFilePath :string
- Description:
- Location of the UI rebuild file
- Source:
Location of the UI rebuild file
Type:
Methods
(async) bundleRequireImports() → {Promise}
- Description:
- Creates bundle files for the relevant RequireJS files
- Source:
Returns:
-
Type
-
Promise
(async) compileHandlebars() → {Promise}
- Description:
- Compile handlebars templates and merge into single file
- Source:
Returns:
-
Type
-
Promise
(async) compileLess() → {Promise}
- Description:
- Run LESS tooling to generate output CSS file
- Source:
Returns:
-
Type
-
Promise
(async) copyAssets() → {Promise}
- Description:
- Source:
Returns:
-
Type
-
Promise
(async) copyHbs() → {Promise}
- Description:
- Copy handlebars templates
- Source:
Returns:
-
Type
-
Promise
(async) copyPlugins()
- Description:
- Copies any specified UI plugins into place
* @return {Promise}
- Source:
(async) copySource() → {Promise}
- Description:
- Source:
Returns:
-
Type
-
Promise
(async) fs(function) → {boolean}
- Description:
- Wrapper for filesystem (fs) functions
- Source:
Parameters:
Name |
Type |
Description |
function |
string
|
Function to run |
Returns:
Whether the process was successful
-
Type
-
boolean
(async) getFiles(globPattern) → {Promise}
- Description:
- Returns list of source files
- Source:
Parameters:
Name |
Type |
Description |
globPattern |
string
|
Glob pattern to specify files |
Returns:
-
Type
-
Promise
(async) initBuildFolder() → {Promise}
- Description:
- Initialises the expected build folder structure
- Source:
Returns:
-
Type
-
Promise
(async) log() → {Promise}
- Description:
- Shim for logging via the ui module
- Source:
Returns:
-
Type
-
Promise
(async) run() → {Promise}
- Description:
- Main entry point, runs the build process
- Source:
Returns:
-
Type
-
Promise
(async) runBabel() → {Promise}
- Description:
- Source:
Returns:
-
Type
-
Promise
(async) runRequireJs() → {Promise}
- Description:
- Runs the RequireJS tooling
- Source:
Returns:
-
Type
-
Promise
(async) writeRequireJsConfig() → {Promise}
- Description:
- Write RequireJS config data to file
- Source:
Returns:
-
Type
-
Promise
(async, static) checkBuildFileExists() → {boolean}
- Description:
- Checks whether the rebuild file exists
- Source:
Returns:
-
Type
-
boolean