mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-24 12:07:02 -04:00
🌈 all colors posiblity replace
This commit is contained in:
parent
0ce6f1420f
commit
bd9c2abc7d
1 changed files with 7 additions and 6 deletions
|
@ -28,11 +28,8 @@ for (let [schema] of Object.entries(colorSchemes)) {
|
|||
|
||||
const schemaSvgsPath = path.resolve("./src/svg", schemaName);
|
||||
|
||||
if (fs.existsSync(schemaSvgsPath)) {
|
||||
rimraf(schemaSvgsPath, function () {});
|
||||
} else {
|
||||
fs.mkdirSync(schemaSvgsPath);
|
||||
}
|
||||
if (fs.existsSync(schemaSvgsPath)) rimraf(schemaSvgsPath, function () {});
|
||||
fs.mkdirSync(schemaSvgsPath);
|
||||
|
||||
// Resolve Paths for svg
|
||||
const staticSvgs = staticCursors.map((svgFile: string) => {
|
||||
|
@ -44,7 +41,11 @@ for (let [schema] of Object.entries(colorSchemes)) {
|
|||
.readFileSync(path.resolve(rawSvgsDir, svgFile), "utf-8")
|
||||
.toString();
|
||||
|
||||
content = content.replace("black", base).replace("white", outline);
|
||||
content = content
|
||||
.replace("black", base)
|
||||
.replace("white", outline)
|
||||
.replace("#000000", base)
|
||||
.replace("#ffffff", outline);
|
||||
|
||||
// Writing new svg
|
||||
fs.writeFileSync(filePath, content, "utf-8");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue