mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-21 10:45:13 -04:00
😎 Remove lock files
This commit is contained in:
parent
260482d8f3
commit
e4b7a1e289
1 changed files with 21 additions and 32 deletions
|
@ -15,7 +15,6 @@ import { matchImages } from "./utils/matchImages";
|
|||
export class BitmapsGenerator {
|
||||
private readonly staticCurs: Cursors;
|
||||
private readonly animatedCurs: Cursors;
|
||||
private infoFilePath = path.resolve(this.bitmapsDir, ".info");
|
||||
|
||||
/**
|
||||
* @param source `BitmapsGenerator` Class's object arguments.
|
||||
|
@ -47,10 +46,6 @@ export class BitmapsGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
private writeRenderInfo() {
|
||||
fs.writeFileSync(this.infoFilePath, "", { encoding: "utf-8" });
|
||||
}
|
||||
|
||||
/**
|
||||
* @argument browser `puppeteer` browser instance.
|
||||
* @argument content `.svg` file code.
|
||||
|
@ -179,34 +174,28 @@ export class BitmapsGenerator {
|
|||
spinner.text = ` Preparing ${this.themeName} .svg files...`;
|
||||
spinner.start();
|
||||
|
||||
if (fs.existsSync(this.infoFilePath)) {
|
||||
// About browser args => https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md#disabling-the-sandbox
|
||||
// Issue => https://github.com/ful1e5/Bibata_Cursor/issues/75#issuecomment-703236554
|
||||
const browser = await puppeteer.launch({
|
||||
ignoreDefaultArgs: [" --single-process ", "--no-sandbox"],
|
||||
headless: true
|
||||
});
|
||||
|
||||
try {
|
||||
spinner.color = "yellow";
|
||||
await this.renderStaticCurs(browser, spinner);
|
||||
await this.renderAnimatedCurs(browser, spinner);
|
||||
|
||||
spinner.text = ` ${chalk.blueBright(
|
||||
this.themeName
|
||||
)} bitmaps stored at ${chalk.greenBright(`${this.bitmapsDir}`)}`;
|
||||
|
||||
spinner.color = "white";
|
||||
spinner.succeed(`Skipping ${this.themeName} (Already rendered)`);
|
||||
} else {
|
||||
// About browser args => https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md#disabling-the-sandbox
|
||||
// Issue => https://github.com/ful1e5/Bibata_Cursor/issues/75#issuecomment-703236554
|
||||
const browser = await puppeteer.launch({
|
||||
ignoreDefaultArgs: [" --single-process ", "--no-sandbox"],
|
||||
headless: true
|
||||
});
|
||||
|
||||
try {
|
||||
spinner.color = "yellow";
|
||||
await this.renderStaticCurs(browser, spinner);
|
||||
await this.renderAnimatedCurs(browser, spinner);
|
||||
|
||||
spinner.text = ` ${chalk.blueBright(
|
||||
this.themeName
|
||||
)} bitmaps stored at ${chalk.greenBright(`${this.bitmapsDir}`)}`;
|
||||
|
||||
spinner.color = "white";
|
||||
this.writeRenderInfo();
|
||||
spinner.succeed();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
spinner.fail();
|
||||
process.exit(1);
|
||||
}
|
||||
spinner.succeed();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
spinner.fail();
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue