[Feature] Add jbang cli to the docs
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.
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.
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.
Yes, you need an additional binary, but...
- Currently you need to have
mvnin your path as well. There might be Gradle users which do not want to use maven - 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. - In contrast,
jbang playwright@microsoft codegen wikipedia.orgis much shorter and works from anywhere. - Installation jbang is very simple: https://www.jbang.dev/documentation/guide/latest/installation.html
Agree with all that you said.
Currently you need to have
mvnin your path as well. There might be Gradle users which do not want to use maven
There is an open request on this: https://github.com/microsoft/playwright-java/issues/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.