-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into there-can-be-only-one
- Loading branch information
Showing
166 changed files
with
2,448 additions
and
1,365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const playwright = require("playwright"); | ||
const chalk = require("chalk"); | ||
const { join } = require("path"); | ||
const { readFileSync } = require("fs"); | ||
|
||
// Turning this on will leave the Chromium browser open, giving you the | ||
// chance to open up the web inspector. | ||
const debugging = false; | ||
|
||
(async () => { | ||
for (const browserType of ["chromium", "firefox", "webkit"]) { | ||
const browser = await playwright[browserType].launch({ headless: !debugging }); | ||
const context = await browser.newContext(); | ||
const page = await context.newPage(); | ||
|
||
const errorCaught = err => { | ||
console.error(chalk.red("There was an error running built/typescript.js in " + browserType)); | ||
console.log(err.toString()); | ||
process.exitCode = 1; | ||
}; | ||
|
||
page.on("error", errorCaught); | ||
page.on("pageerror", errorCaught); | ||
page.on("console", log => console[log._type](log._text)); | ||
|
||
await page.setContent(` | ||
<html> | ||
<script>${readFileSync(join("built", "local", "typescript.js"), "utf8")}</script> | ||
</html> | ||
`); | ||
|
||
if (!debugging) { | ||
await browser.close(); | ||
} | ||
else { | ||
console.log("Not closing the browser, you'll need to exit the process in your terminal manually"); | ||
} | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.