export-svg-typescript 0.1.76 → 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +24 -0
- package/package.json +1 -1
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# CLAUDE.md — `export-svg-typescript` (`packages/export-svg-icons-typescript`)
|
|
2
|
+
|
|
3
|
+
**npm name:** `export-svg-typescript` · **skill:** [`skills/export-svg-typescript`](../../skills/export-svg-typescript/SKILL.md)
|
|
4
|
+
· **runner:** Vitest · **build:** none
|
|
5
|
+
|
|
6
|
+
Turns a directory of SVG files into a tree-shakable TypeScript barrel, with
|
|
7
|
+
runtime color and size options.
|
|
8
|
+
|
|
9
|
+
## Rules
|
|
10
|
+
|
|
11
|
+
- **Tree-shakability is the feature.** One export per icon, no side effects at
|
|
12
|
+
module scope, no barrel that forces the whole set into a bundle. A change that
|
|
13
|
+
makes the output convenient but unshakable defeats the package.
|
|
14
|
+
- SVG input is untrusted markup. Sanitize; never interpolate raw file content
|
|
15
|
+
into a template where it could escape the attribute it belongs in.
|
|
16
|
+
- Output is deterministic — same input directory, same file, byte for byte.
|
|
17
|
+
Sort; don't depend on readdir order.
|
|
18
|
+
|
|
19
|
+
Used by sibling repos in CI (`npx export-svg-typescript@latest …`), so a
|
|
20
|
+
breaking change to the CLI flags reaches beyond this monorepo.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cd packages/export-svg-icons-typescript && bun run test
|
|
24
|
+
```
|