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] Add jbang cli to the docs #864

Open
OLibutzki opened this issue Mar 24, 2022 · 4 comments
Open

[Feature] Add jbang cli to the docs #864

OLibutzki opened this issue Mar 24, 2022 · 4 comments

Comments

@OLibutzki
Copy link

For the Playwright Java CLI a jbang-catalog exists at https://github.com/microsoft/jbang-catalog

Unfortunately jbang is not used or mentioned in the Playwright Java docs, although it's a great and easy to use mvn alternative.

What about providing the jbang command line as a mvn alternative in the docs? I would prefer to have two tabs, so the reader can switch based on her preferences.

@OLibutzki
Copy link
Author

Just saw that you use this approach in the node section. You can switch between JavaScript and Typescript. The very same approach could be a great way to solve this issue.

@mxschmitt mxschmitt transferred this issue from microsoft/playwright.dev Mar 24, 2022
@yury-s yury-s changed the title Add jbang cli to the docs [Feature] Add jbang cli to the docs Mar 24, 2022
@yury-s
Copy link
Member

yury-s commented Mar 24, 2022

Last time we looked into this it didn't feel like jbang was wildly adopted and it also requires extra setup which would have to be documented somewhere to help people unfamiliar with the framework. With that said, we are open to contributions, the documentation source lives here.

@OLibutzki
Copy link
Author

OLibutzki commented Mar 25, 2022

Yes, you need an additional binary, but...

  1. Currently you need to have mvn in your path as well. There might be Gradle users which do not want to use maven
  2. Running a command like mvn exec:java -e -Dexec.mainClass=com.microsoft.playwright.CLI -Dexec.args="codegen wikipedia.org" from an arbitrary path doesn't work as you need to have a pom.xml in that directory.
  3. In contrast, jbang playwright@microsoft codegen wikipedia.org is much shorter and works from anywhere.
  4. Installation jbang is very simple: https://www.jbang.dev/documentation/guide/latest/installation.html

@yury-s
Copy link
Member

yury-s commented Mar 25, 2022

Agree with all that you said.

Currently you need to have mvn in your path as well. There might be Gradle users which do not want to use maven

There is an open request on this: #571 This is not a top priority at the moment, but we accept patches.

Installation jbang is very simple: https://www.jbang.dev/documentation/guide/latest/installation.html

Awesome. Maybe it's enough to just add a link to that documentation somewhere in the intro section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants