playwright/browser_patches/webkit/concat_protocol.js

8 lines
448 B
JavaScript
Raw Normal View History

2019-11-19 05:18:28 +03:00
const fs = require('fs');
const path = require('path');
const checkoutPath = process.env.WK_CHECKOUT_PATH || path.join(__dirname, 'checkout');
const protocolDir = path.join(checkoutPath, './Source/JavaScriptCore/inspector/protocol');
2019-11-19 05:18:28 +03:00
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));