Skip to content

Commit

Permalink
feat: provide jbang-catalog to run playwright cli (microsoft#519)
Browse files Browse the repository at this point in the history
Co-authored-by: Max Rydahl Andersen <[email protected]>
  • Loading branch information
maxandersen and Max Rydahl Andersen authored Jul 27, 2021
1 parent fb50870 commit 04419c7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jbang-catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"catalogs": {},
"aliases": {
"playwright": {
"script-ref": "scripts/playwright.java",
"description": "Playwright lets you automate Chromium, Firefox and Webkit with a single API. \nWith this cli you can install, trace, generate pdf and screenshots and more.\nExample on how to record and run a script:\n```\n jbang playwright@microsoft/playwright-java codegen -o Example.java`\n jbang --deps com.microsoft.playwright:playwright:RELEASE Example.java\n```"
}
},
"templates": {}
}
17 changes: 17 additions & 0 deletions scripts/playwright.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS com.microsoft.playwright:playwright:RELEASE
//DESCRIPTION Playwright lets you automate Chromium, Firefox and Webkit with a single API.
//DESCRIPTION With this cli you can install, trace, generate pdf and screenshots and more.
//DESCRIPTION
//DESCRIPTION Example on how to record and run a script:
//DESCRIPTION ```
//DESCRIPTION jbang playwright@microsoft/playwright-java codegen -o Example.java`
//DESCRIPTION jbang --deps com.microsoft.playwright:playwright:RELEASE Example.java
//DESCRIPTION ```

public class playwright {

public static void main(String... args) throws Exception {
com.microsoft.playwright.CLI.main(args);
}
}

0 comments on commit 04419c7

Please sign in to comment.