Skip to content

Commit b8eab4d

Browse files
committed
chore: update add-icons script
1 parent 3f30ef8 commit b8eab4d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"clear:dist": "rimraf ./dist",
4949
"release": "pnpm build && changeset publish",
5050
"postinstall": "git config blame.ignoreRevsFile .git-blame-ignore-revs",
51-
"add-icons": "cd src/icons && node add-new-icon.js && fix"
51+
"add-icons": "cd src/icons && node add-new-icon.js && pnpm fix"
5252
},
5353
"publishConfig": {
5454
"directory": "dist"

src/icons/add-new-icon.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import prettier from 'prettier';
2727
let svgContent = fs.readFileSync(svgFile, 'utf8');
2828

2929
// Replace '#43436B' with 'currentColor'
30-
svgContent = svgContent.replace(/(#43436B|#000|#000000)/g, 'currentColor');
30+
svgContent = svgContent.replace(
31+
/("#43436B"|"#000"|"#000000"|"black")/g,
32+
'"currentColor"',
33+
);
3134

3235
// Ensure the <svg> tag has a viewBox attribute; if not, add one.
3336
const svgTagMatch = svgContent.match(/<svg\b([^>]*)>/);

0 commit comments

Comments
 (0)