Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for flat build output of the root (library-)project #507

Closed
RandomByte opened this issue Mar 5, 2021 · 1 comment · Fixed by SAP/ui5-project#624 or SAP/ui5-cli#665
Closed
Labels
enhancement New feature or request module/ui5-builder Related to the UI5 Builder module

Comments

@RandomByte
Copy link
Member

Is your feature request related to a problem? Please describe.

Many target platforms for UI5 projects expect a "flat" directory structure to be deployed. Meaning that there is no resources/ directory and no my/company/project namespace structure.

Explanation: Such projects might be deployed to different endpoints (i.e. they might not share a relative path). At UI5 runtime they are then loaded by configuring the corresponding resource mapping. This makes it unnecessary or even confusing in some cases to have another UI5 runtime-oriented directory structure below the project's deployment endpoint.

Describe the solution you'd like

This behavior is already in place for application projects. But it's missing for library and theme-library projects and the expected behavior for component projects is yet to be decided.

There are already multiple solutions available:

  • SAP Web IDE executes a "flatten" script after every build which uses the cp and rm UNIX commands
  • There's a custom task "ui5-task-flatten-library"

Since this is a very common use case and the basic functionality is already present in UI5 Tooling thanks to the ui5-fs abstraction layer, it might make sense to have this as a standard offering of UI5 Tooling itself.

Solution proposals

A solution might be to offer a CLI flag which always flattens the root project of the build.

An alternative would be to always flatten the root project if no other projects are being built (i.e. no --all build).

Describe alternatives you've considered

See existing solutions above

Additional context

none

@RandomByte RandomByte added enhancement New feature or request module/ui5-builder Related to the UI5 Builder module labels Mar 5, 2021
@RandomByte RandomByte changed the title Add support for flat build output of the root (library) project Add support for flat build output of the root (library-)project Mar 5, 2021
d3xter666 added a commit to SAP/ui5-cli that referenced this issue Dec 12, 2023
New CLI `build` option `--output-style`. Whether to omit the
/resources/\<namespace\> directory structure in the build output.

Resolves SAP/ui5-tooling#507
Depends on: SAP/ui5-project#624
d3xter666 added a commit to SAP/ui5-project that referenced this issue Dec 12, 2023
…ild output (#624)

New option `outputStyle`. Whether to omit the `/resources/<namespace>`
directory structure in the build output.

Resolves SAP/ui5-tooling#507

---------

Co-authored-by: Yavor Ivanov <yavor.ivanov@sap.com>
Co-authored-by: Yavor Ivanov <d3xter666@users.noreply.github.com>
Co-authored-by: Günter Klatt <57760635+KlattG@users.noreply.github.com>
@flovogt
Copy link
Member

flovogt commented Dec 13, 2023

Available with @ui5/cli@v3.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module/ui5-builder Related to the UI5 Builder module
Projects
None yet
2 participants