Skip to content

@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: project/lib/build/ProjectBuilder.js, line 14

Parameters:
NameTypeDescription
parametersobject
Properties:
NameTypeAttributesDescription
graph@ui5/project/graph/ProjectGraphProject graph
buildConfig@ui5/project/build/ProjectBuilder~BuildConfigurationoptionalBuild configuration
taskRepository@ui5/builder/tasks/taskRepositoryTask Repository module to use

Methods

(async) build(parameters) → {Promise}

Description: Executes a project build, including all necessary or requested dependencies

Source: project/lib/build/ProjectBuilder.js, line 139

Parameters:
NameTypeDescription
parametersobjectParameters
Properties:
NameTypeAttributesDefaultDescription
destPathstringTarget path
cleanDestbooleanoptionalfalseDecides whether project should clean the target path before build
includedDependenciesArray<(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.
excludedDependenciesArray<(string | RegExp)>optional[]List of names of projects to exclude from the build result.
dependencyIncludes@ui5/project/build/ProjectBuilder~DependencyIncludesoptionalAlternative 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: project/lib/build/ProjectBuilder.js, line 16

Properties:
NameTypeAttributesDefaultDescription
selfContainedbooleanoptionalfalseFlag to activate self contained build
cssVariablesbooleanoptionalfalseFlag to activate CSS variables generation
jsdocbooleanoptionalfalseFlag to activate JSDoc build
createBuildManifestbooleanoptionalfalseWhether 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.
outputStylemodule:@ui5/project/build/ProjectBuilderOutputStyleoptionalDefaultProcesses build results into a specific directory structure.
includedTasksArray<string>optional[]List of tasks to be included
excludedTasksArray<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: project/lib/build/ProjectBuilder.js, line 35

Properties:
NameTypeDescription
includeAllDependenciesbooleanWhether 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
includeDependencyArray<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
includeDependencyRegExpArray<string>Strings which are interpreted as regular expressions
to describe the selection of dependencies to be considered in includedDependencies
includeDependencyTreeArray<string>The dependencies to be considered in includedDependencies;
transitive dependencies are also appended
excludeDependencyArray<string>The dependencies to be considered in excludedDependencies
excludeDependencyRegExpArray<string>Strings which are interpreted as regular expressions
to describe the selection of dependencies to be considered in excludedDependencies
excludeDependencyTreeArray<string>The dependencies to be considered in excludedDependencies;
transitive dependencies are also appended
defaultIncludeDependencyArray<string>Same as includeDependency parameter;
typically used in project build settings
defaultIncludeDependencyRegExpArray<string>Same as includeDependencyRegExp parameter;
typically used in project build settings
defaultIncludeDependencyTreeArray<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