vb-prepare

Copies either the raw application sources or the processed application sources to the build/optimized directory where the optimization takes place.

If the build/processed directory exists (as a result of the vb-process task) and the rawSourcesMode option is not specified, this task will copy the build/processed directory into the build/optimized directory.

If the build/processed directory does not exist or rawSourcesMode option is set to 'True', this task will copy the raw application sources (specified by the gitSources option, set by default as "./") into the build/optimized directory and invoke the vb-process-raw task.

The following table describes the subtasks, hooks, and inputs and outputs of the vb-prepare task:

Detail Description
subtasks vb-process-raw
hooks n/a
input build/processed/* or ${gitSources}
output build/optimized/*

The following table describes the options for the vb-prepare task:

Name Mandatory Default Value Description
target no build Name of build directory.
rawSourcesMode no false Specifies if the task should copy raw application sources or metadata processed sources from the build/processed directory.

Note: The implicit value is defined by the existence of the build/processed directory (true if the directory exists).

This task can be used on its own if you're fine tuning the application's require bundles optimization and you don't want to run the vb-optimize task every time you change settings. In this case, calling vb-prepare before vb-require-bundle will prepare fresh processed application sources for optimization.