mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-25 04:24:33 -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);
|
const schemaSvgsPath = path.resolve("./src/svg", schemaName);
|
||||||
|
|
||||||
if (fs.existsSync(schemaSvgsPath)) {
|
if (fs.existsSync(schemaSvgsPath)) rimraf(schemaSvgsPath, function () {});
|
||||||
rimraf(schemaSvgsPath, function () {});
|
|
||||||
} else {
|
|
||||||
fs.mkdirSync(schemaSvgsPath);
|
fs.mkdirSync(schemaSvgsPath);
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve Paths for svg
|
// Resolve Paths for svg
|
||||||
const staticSvgs = staticCursors.map((svgFile: string) => {
|
const staticSvgs = staticCursors.map((svgFile: string) => {
|
||||||
|
@ -44,7 +41,11 @@ for (let [schema] of Object.entries(colorSchemes)) {
|
||||||
.readFileSync(path.resolve(rawSvgsDir, svgFile), "utf-8")
|
.readFileSync(path.resolve(rawSvgsDir, svgFile), "utf-8")
|
||||||
.toString();
|
.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
|
// Writing new svg
|
||||||
fs.writeFileSync(filePath, content, "utf-8");
|
fs.writeFileSync(filePath, content, "utf-8");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue