From 263c736140d413829cf08ebdb705feba7668c7c1 Mon Sep 17 00:00:00 2001 From: touchscale <11134128+touchscale_admin@user.noreply.gitee.com> Date: Fri, 23 Jun 2023 14:07:07 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20.puppete?= =?UTF-8?q?errc.cjs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .puppeteerrc.cjs | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .puppeteerrc.cjs diff --git a/.puppeteerrc.cjs b/.puppeteerrc.cjs deleted file mode 100644 index 4907718..0000000 --- a/.puppeteerrc.cjs +++ /dev/null @@ -1,33 +0,0 @@ -const os = require("os"); -const { existsSync } = require("fs"); -const arch = os.arch(); -let skipDownload = false; -let executablePath; -//win32 存在 Edge 优先选择 -if (process.platform == "win32") { - if ( - existsSync("C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe") - ) { - skipDownload = true; - executablePath = - "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"; - } -} else if (process.platform == "linux") { - //如果arm64架构跳过下载 - if (arch == "arm64" || arch == "aarch64") { - skipDownload = true; - } - //不管什么架构,如果存在配置则跳过下载,且配置路径 - if (existsSync("/usr/bin/chromium")) { - skipDownload = true; - executablePath = "/usr/bin/chromium"; - } -} - -/** - * @type {import("puppeteer").Configuration} - */ -module.exports = { - skipDownload, - executablePath, -};