BuildCommand

BuildCommand

new BuildCommand()

Source:
Properties:
Name Type Description
BUILD_DIR string Build directory relative path
JS_GLOB string A glob pattern where javascript files are
BABEL_RECIPES Object Babel configuration for transforming es6 MasteryJS source codes
COPY_GLOB Array.<string> Glob patterns where non javascript files are
MK_INTRO string The translation key of 'initializing' phase message
MK_BUILD_SUCCESS string The translation key of 'build success' phase message
MK_CLEANING string The translation key of 'cleaning' phase message
MK_COPYING_NON_JS string The translation key of 'copying non javascript files' phase message
MK_COPYING_JS string The translation key of 'copying javascript files' phase message
MK_WRITING_RUN_CONF string The translation key of 'writing mastery.run.js file' phase message
The main class that handles the 'build' command execution.

Methods

copyJS() → {Promise}

Source:
Copy javascript files -> transform using babel -> babili.
Returns:
Type
Promise

copyNonJS() → {Promise}

Source:
Copy none javascript files such as json configuration files, etc.
Returns:
Type
Promise

execute() → {Promise}

Source:
The main method to call another methods sequentially, including decorations output.
Returns:
Type
Promise

writeRunConf()

Source:
Write mastery.run.json file, append 'name' key value from project name question answered by user before.