Use Puppeteer's chrome install

This commit is contained in:
Jason Miller
2018-06-29 01:43:13 +00:00
parent 668acf2698
commit e9dad3d884

View File

@@ -1,6 +1,7 @@
const fs = require("fs");
function readJsonFile(path) {
process.env.CHROME_BIN = require('puppeteer').executablePath();
// TypeScript puts lots of comments in the default `tsconfig.json`, so you
// cant use `require()` to read it. Hence this hack.
return eval("(" + fs.readFileSync(path).toString("utf-8") + ")");