Skip to content

Commit 3050c96

Browse files
committed
rename sprite-icons to svg-sprite
1 parent 050d878 commit 3050c96

File tree

1,625 files changed

+10
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,625 files changed

+10
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package-lock.json
99
# testing
1010
/coverage
1111
/playwright-report
12-
/type-errors.log
12+
sprite-icons/type-errors.log
1313
# next.js
1414
/.next/
1515
/out/
-106 KB
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"src/config.js",
1212
"src/config.d.ts",
1313
"scripts",
14+
"!/scripts/gen-dist.js",
15+
"!/scripts/gen-wrappers.js",
1416
"README.md"
1517
],
1618
"scripts": {
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ if (missing.length) {
4545
// 6️⃣ Write the sprite under the consumer's public/
4646
const sprite = store.toString({ inline: true });
4747
const outDir = path.join(process.cwd(), "public");
48+
const outFile = path.join(outDir, SPRITE_PATH);
49+
4850
fs.mkdirSync(outDir, { recursive: true });
49-
fs.writeFileSync(path.join(outDir, SPRITE_PATH), sprite);
51+
//clear file if it exists
52+
if (fs.existsSync(outFile)) {
53+
fs.unlinkSync(outFile);
54+
}
55+
fs.writeFileSync(outFile, sprite);
5056

5157
console.log(`✅ Built public/icons.svg with ${found.size} icons.`);

0 commit comments

Comments
 (0)