mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-17 16:44:59 -04:00
🧹 Cleanup
This commit is contained in:
parent
fa8de2813f
commit
3919925cfa
1 changed files with 2 additions and 19 deletions
21
src/index.ts
21
src/index.ts
|
@ -1,20 +1,3 @@
|
|||
import path from "path";
|
||||
import fs from "fs";
|
||||
import puppeteer from "puppeteer";
|
||||
import { bitmapsDir, svgs } from "./config";
|
||||
|
||||
import { bitmapsPath } from "./config";
|
||||
|
||||
(async () => {
|
||||
const browser = await puppeteer.launch({
|
||||
ignoreDefaultArgs: process.env.IS_LOCAL ? [" --single-process "] : [],
|
||||
headless: true,
|
||||
});
|
||||
const page = await browser.newPage();
|
||||
await page.goto("https://example.com");
|
||||
|
||||
if (!fs.existsSync(bitmapsPath)) fs.mkdirSync(bitmapsPath);
|
||||
|
||||
await page.pdf({ path: path.resolve(bitmapsPath, "google.pdf") });
|
||||
|
||||
await browser.close();
|
||||
})();
|
||||
console.log(bitmapsDir, svgs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue