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

[FEATURE] ProjectBuilder: Add outputStyle option to request flat build output #624

Merged
merged 29 commits into from
Dec 12, 2023

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Jun 14, 2023

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

Resolves SAP/ui5-tooling#507

@coveralls
Copy link

coveralls commented Jun 14, 2023

Coverage Status

coverage: 95.761% (-0.2%) from 95.955%
when pulling 577696f on flat-build-output
into a0a21b7 on main.

@matz3 matz3 added the enhancement New feature or request label Oct 20, 2023
New option 'flatOutput'. If set to true, libraries and theme-libraries
will omit the "/resources/<namespace>" directory structure in the build
output.
@d3xter666 d3xter666 requested a review from a team December 1, 2023 08:59
lib/build/ProjectBuilder.js Outdated Show resolved Hide resolved
lib/build/ProjectBuilder.js Outdated Show resolved Hide resolved
lib/build/ProjectBuilder.js Outdated Show resolved Hide resolved
lib/build/ProjectBuilder.js Outdated Show resolved Hide resolved
lib/build/helpers/BuildContext.js Outdated Show resolved Hide resolved
lib/build/helpers/BuildContext.js Outdated Show resolved Hide resolved
lib/build/helpers/BuildContext.js Outdated Show resolved Hide resolved
lib/build/helpers/ProjectBuilderOutputStyle.js Outdated Show resolved Hide resolved
lib/build/helpers/ProjectBuilderOutputStyle.js Outdated Show resolved Hide resolved
lib/graph/ProjectGraph.js Outdated Show resolved Hide resolved
@RandomByte RandomByte requested review from KlattG and removed request for KlattG December 8, 2023 09:44
@RandomByte
Copy link
Member Author

We should request a review from @KlattG once the texts are updated

lib/build/helpers/ProjectBuilderOutputStyle.js Outdated Show resolved Hide resolved
* @property {string} Default Default directory structure for every project type.
* For applications this is identical to "Flat" and for libraries to "Namespace".
* Other types have a more distinct default output style.
* @property {string} Flat Omits the project namespace and the "resources" directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These string variable names are in uppercase - do we have any guidelines which case to use?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same as the following module we already have: https://github.com/SAP/ui5-project/blob/main/lib/ui5Framework/maven/CacheMode.js

Basically, those are enums and they are expected to start with a capital letter. It's actually a workaround we use as JavaScript does not have native Enum type.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

d3xter666 added a commit to SAP/ui5-cli that referenced this pull request 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
@RandomByte
Copy link
Member Author

LGTM

@d3xter666 d3xter666 requested a review from KlattG December 12, 2023 13:31
@matz3
Copy link
Member

matz3 commented Dec 12, 2023

Maybe adjust the PR title to mention the new outputStyle option?

@d3xter666 d3xter666 changed the title [FEATURE] ProjectBuilder: Add option to request flat build output [FEATURE] ProjectBuilder: Add outputStyle option to request flat build output Dec 12, 2023
@d3xter666 d3xter666 merged commit 79312fc into main Dec 12, 2023
15 checks passed
@d3xter666 d3xter666 deleted the flat-build-output branch December 12, 2023 13:46
Copy link
Contributor

@KlattG KlattG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

* @property {string} Default Default directory structure for every project type.
* For applications this is identical to "Flat" and for libraries to "Namespace".
* Other types have a more distinct default output style.
* @property {string} Flat Omits the project namespace and the "resources" directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

d3xter666 added a commit to SAP/ui5-tooling that referenced this pull request Dec 14, 2023
Adds a section which describes the Build Output Styles feature and usage
variants.

Depends on:
- SAP/ui5-project#624
- SAP/ui5-cli#665

---------

Co-authored-by: Günter Klatt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for flat build output of the root (library-)project
6 participants