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 Setup instructions #125

Merged
merged 4 commits into from
Jul 10, 2024
Merged

Add Setup instructions #125

merged 4 commits into from
Jul 10, 2024

Conversation

konnraad
Copy link
Contributor

discussed with @flovogt

Copy link

cla-assistant bot commented May 27, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

cla-assistant bot commented May 27, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@flovogt
Copy link

flovogt commented May 27, 2024

@matz3 and @RandomByte, should we promote global installation or should we try to use npx in this case? In the UI5 Tooling documentation https://sap.github.io/ui5-tooling/v4/pages/GettingStarted/ we recommend global installation but i guess at that point in time npx was not yet available.

@@ -116,11 +116,11 @@ You can view and download all files at [Quick Start - Step 1](https://ui5.sap.co

7. Open a terminal in the app root folder and execute `npm i -D @ui5/cli` to install UI5 Tooling.

8. Execute `ui5 init` in the app root folder.
8. Execute `npx ui5 init` in the app root folder.
Copy link

Choose a reason for hiding this comment

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

It would need to be npx @ui5/cli init (https://www.npmjs.com/package/@ui5/cli), right? There's no package named ui5, as it is a scope.

Copy link

Choose a reason for hiding this comment

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

true

Copy link

Choose a reason for hiding this comment

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

@konnraad feel free to adjust the PR

Copy link

Choose a reason for hiding this comment

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

Well, I think I missed some detail. npx ui5 works fine, if you have the @ui5/cli package installed in your project. Which is the case in this scenario. But IMO this leads to a lot of confusion (as it already confused me).

npm exec ui5 would be the correct and safe way of invoking the local ui5 binary in a package. This way you don't accidentally try to install the ui5 package. But again, this is then also longer to type.

And our global ui5 CLI invokes the local installation, so there's no downside of having a global and local installation.

Copy link
Contributor Author

@konnraad konnraad May 27, 2024

Choose a reason for hiding this comment

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

I think a better solution would be to install it as a dev dependency and also globally.
I've tested on my device, and it worked for me.
(I've updated my initial PR)

It would look like this:

npm install -D -g @ui5/cli

schauen wir mal was wird

@matz3
Copy link

matz3 commented May 27, 2024

@matz3 and @RandomByte, should we promote global installation or should we try to use npx in this case? In the UI5 Tooling documentation https://sap.github.io/ui5-tooling/v4/pages/GettingStarted/ we recommend global installation but i guess at that point in time npx was not yet available.

Typically the command is used more than just once. Therefore, I would still expect that one global install is more user-friendly than having to use npx @ui5/cli something instead of ui5 something every time.
But of course, both are valid.

@OlMue OlMue added the type/content-gaps Something essential is missing in the documentation. label May 28, 2024
@KlattG KlattG added the contribution Valuable Contribution label May 28, 2024
Copy link

sap-doc-bot bot commented May 28, 2024

Thank you for your valuable content contribution, @konnraad! So that we can recognize your contribution in the SAP Community, please check your SAP Community user ID (this is a number) in your personal settings page and share it with us in a reply to this comment. Make sure you just include the number in the reply.

Your user ID is displayed as follows:

Change display name for User ID N

where N is your user ID. For example, 53 is the user ID of the user 'qmacro'.

Please note that we are currently refactoring our profile and badge system on the SAP Community, and will start assigning badges again when that's complete.

@KlattG KlattG added follow-up-with/dev Clarification with development needed. in-discussion This item is being discussed internally size/s Requires minimal effort to get changed. type/examples-samples Related to existing examples/samples, or request for new examples/samples. labels May 28, 2024
@konnraad konnraad changed the title Add npx commands to allow execution of ui5 commands Add Setup instructions May 29, 2024
@KlattG KlattG merged commit 87b38d0 into SAP-docs:main Jul 10, 2024
3 checks passed
@KlattG
Copy link
Contributor

KlattG commented Jul 10, 2024

Implemented from 1.127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Valuable Contribution follow-up-with/dev Clarification with development needed. in-discussion This item is being discussed internally size/s Requires minimal effort to get changed. type/content-gaps Something essential is missing in the documentation. type/examples-samples Related to existing examples/samples, or request for new examples/samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants