😎 Remove lock files

This commit is contained in:
ful1e5 2020-10-24 10:16:19 +05:30
parent 260482d8f3
commit e4b7a1e289

View file

@ -15,7 +15,6 @@ import { matchImages } from "./utils/matchImages";
export class BitmapsGenerator { export class BitmapsGenerator {
private readonly staticCurs: Cursors; private readonly staticCurs: Cursors;
private readonly animatedCurs: Cursors; private readonly animatedCurs: Cursors;
private infoFilePath = path.resolve(this.bitmapsDir, ".info");
/** /**
* @param source `BitmapsGenerator` Class's object arguments. * @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 browser `puppeteer` browser instance.
* @argument content `.svg` file code. * @argument content `.svg` file code.
@ -179,34 +174,28 @@ export class BitmapsGenerator {
spinner.text = ` Preparing ${this.themeName} .svg files...`; spinner.text = ` Preparing ${this.themeName} .svg files...`;
spinner.start(); 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.color = "white";
spinner.succeed(`Skipping ${this.themeName} (Already rendered)`); spinner.succeed();
} else { } catch (error) {
// About browser args => https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md#disabling-the-sandbox console.error(error);
// Issue => https://github.com/ful1e5/Bibata_Cursor/issues/75#issuecomment-703236554 spinner.fail();
const browser = await puppeteer.launch({ process.exit(1);
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);
}
} }
} }
} }