@ui5/project/build/ProjectBuilder

@ui5/project/build/ProjectBuilder

new @ui5/project/build/ProjectBuilder(parameters)

Description:
  • Executes a project build, including all necessary or requested dependencies
Source:
Parameters:
Name Type Description
parameters object
Properties
Name Type Attributes Description
graph @ui5/project/graph/ProjectGraph Project graph
buildConfig @ui5/project/build/ProjectBuilder~BuildConfiguration <optional>
Build configuration
taskRepository @ui5/builder/tasks/taskRepository Task Repository module to use

Methods

(async) build(parameters) → {Promise}

Description:
  • Executes a project build, including all necessary or requested dependencies
Source:
Parameters:
Name Type Description
parameters object Parameters
Properties
Name Type Attributes Default Description
destPath string Target path
cleanDest boolean <optional>
false Decides whether project should clean the target path before build
includedDependencies Array.<(string|RegExp)> <optional>
[] List of names of projects to include in the build result If the wildcard '*' is provided, all dependencies will be included in the build result.
excludedDependencies Array.<(string|RegExp)> <optional>
[] List of names of projects to exclude from the build result.
dependencyIncludes @ui5/project/build/ProjectBuilder~DependencyIncludes <optional>
Alternative to the includedDependencies and excludedDependencies parameters. Allows for a more sophisticated configuration for defining which dependencies should be part of the build result. If this is provided, the other mentioned parameters are ignored.
Returns:
Promise resolving once the build has finished
Type
Promise

Type Definitions

BuildConfiguration

Description:
  • Build Configuration
Source:
Properties:
Name Type Attributes Default Description
selfContained boolean <optional>
false Flag to activate self contained build
cssVariables boolean <optional>
false Flag to activate CSS variables generation
jsdoc boolean <optional>
false Flag to activate JSDoc build
createBuildManifest boolean <optional>
false Whether to create a build manifest file for the root project. This is currently only supported for projects of type 'library' and 'theme-library' No other dependencies can be included in the build result.
outputStyle module:@ui5/project/build/ProjectBuilderOutputStyle <optional>
Default Processes build results into a specific directory structure.
includedTasks Array.<string> <optional>
[] List of tasks to be included
excludedTasks Array.<string> <optional>
[] List of tasks to be excluded. If the wildcard '*' is provided, only the included tasks will be executed.
Build Configuration
Type:
  • object

DependencyIncludes

Description:
  • As an alternative to providing plain lists of names of dependencies to include and exclude, you can provide a more complex "Dependency Includes" object to define which dependencies should be part of the build result.
    This information is then used to compile lists of includedDependencies and excludedDependencies, which are applied during the build process.

    Regular expression-parameters are directly applied to a list of all project dependencies so that they don't need to be evaluated in later processing steps.

    Generally, includes are handled with a higher priority than excludes. Additionally, operations for processing transitive dependencies are handled with a lower priority than explicitly mentioned dependencies. The "default" dependency-includes are appended at the end.

    The priority of the various dependency lists is applied in the following order. Note that a later exclude can't overrule an earlier include.
    1. includeDependency, includeDependencyRegExp
    2. excludeDependency, excludeDependencyRegExp
    3. includeDependencyTree
    4. excludeDependencyTree
    5. defaultIncludeDependency, defaultIncludeDependencyRegExp, defaultIncludeDependencyTree
Source:
Properties:
Name Type Description
includeAllDependencies boolean Whether all dependencies should be part of the build result This parameter has the lowest priority and basically includes all remaining (not excluded) projects as include
includeDependency Array.<string> The dependencies to be considered in includedDependencies; the * character can be used as wildcard for all dependencies and is an alias for the CLI option --all
includeDependencyRegExp Array.<string> Strings which are interpreted as regular expressions to describe the selection of dependencies to be considered in includedDependencies
includeDependencyTree Array.<string> The dependencies to be considered in includedDependencies; transitive dependencies are also appended
excludeDependency Array.<string> The dependencies to be considered in excludedDependencies
excludeDependencyRegExp Array.<string> Strings which are interpreted as regular expressions to describe the selection of dependencies to be considered in excludedDependencies
excludeDependencyTree Array.<string> The dependencies to be considered in excludedDependencies; transitive dependencies are also appended
defaultIncludeDependency Array.<string> Same as includeDependency parameter; typically used in project build settings
defaultIncludeDependencyRegExp Array.<string> Same as includeDependencyRegExp parameter; typically used in project build settings
defaultIncludeDependencyTree Array.<string> Same as includeDependencyTree parameter; typically used in project build settings
As an alternative to providing plain lists of names of dependencies to include and exclude, you can provide a more complex "Dependency Includes" object to define which dependencies should be part of the build result.
This information is then used to compile lists of includedDependencies and excludedDependencies, which are applied during the build process.

Regular expression-parameters are directly applied to a list of all project dependencies so that they don't need to be evaluated in later processing steps.

Generally, includes are handled with a higher priority than excludes. Additionally, operations for processing transitive dependencies are handled with a lower priority than explicitly mentioned dependencies. The "default" dependency-includes are appended at the end.

The priority of the various dependency lists is applied in the following order. Note that a later exclude can't overrule an earlier include.
  1. includeDependency, includeDependencyRegExp
  2. excludeDependency, excludeDependencyRegExp
  3. includeDependencyTree
  4. excludeDependencyTree
  5. defaultIncludeDependency, defaultIncludeDependencyRegExp, defaultIncludeDependencyTree
Type:
  • object