mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 22:22:53 +03:00
a80fa08698
This moves default Firefox and WebKit checkouts to $HOME folder, unless browser specific env variables are specified. In other words: - Firefox checkouts goes to `$HOME/firefox` unless there's a `$FF_CHECKOUT_PATH` that specifies a custom location. - WebKit checkout goes to `$HOME/webkit` unless there's a `$WK_CHECKOUT_PATH` that specifies a custom location. With this change, all build bots will now re-use checkouts between builds, which should speed up compilation.
8 lines
453 B
JavaScript
8 lines
453 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const checkoutPath = process.env.WK_CHECKOUT_PATH || path.join(process.env.HOME, 'webkit');
|
|
const protocolDir = path.join(checkoutPath, './Source/JavaScriptCore/inspector/protocol');
|
|
const files = fs.readdirSync(protocolDir).filter(f => f.endsWith('.json')).map(f => path.join(protocolDir, f));
|
|
const json = files.map(file => JSON.parse(fs.readFileSync(file)));
|
|
console.log(JSON.stringify(json));
|