Skip to content

Commit cb3c3e7

Browse files
committed
refactor(project): Add internal flag to skip writing resources to dist
By setting UI5_BUILD_NO_WRITE_DEST to any truthy value, build results will not be written to the dist directory. This is useful for testing the build performance, focusing on the build itself rather then the heavy I/O operation of writing the result to disk.
1 parent bbf3d69 commit cb3c3e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/project/lib/build/ProjectBuilder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ class ProjectBuilder {
251251
await projectBuildContext.getTaskRunner().runTasks();
252252
this.#log.endProjectBuild(projectName, projectType);
253253
}
254-
if (!requestedProjects.includes(projectName)) {
255-
// Project has not been requested
254+
if (!requestedProjects.includes(projectName) || !!process.env.UI5_BUILD_NO_WRITE_DEST) {
255+
// Project has not been requested or writing is disabled
256256
// => Its resources shall not be part of the build result
257257
continue;
258258
}

0 commit comments

Comments
 (0)