@moamfar/icon-pack 1.0.2 → 1.0.4

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.
Files changed (60) hide show
  1. package/README.md +104756 -82
  2. package/{src/generated → dist/types}/types.d.ts +1 -1
  3. package/package.json +40 -17
  4. package/readme.js +146 -260
  5. package/src/generated/Dislike.d.ts +0 -3
  6. package/src/generated/Dislike.js +0 -25
  7. package/src/generated/Dislike.tsx +0 -27
  8. package/src/generated/Heart.d.ts +0 -3
  9. package/src/generated/Heart.js +0 -25
  10. package/src/generated/Heart.tsx +0 -27
  11. package/src/generated/HeartAngle.d.ts +0 -3
  12. package/src/generated/HeartAngle.js +0 -25
  13. package/src/generated/HeartAngle.tsx +0 -27
  14. package/src/generated/HeartBroken.d.ts +0 -3
  15. package/src/generated/HeartBroken.js +0 -25
  16. package/src/generated/HeartBroken.tsx +0 -27
  17. package/src/generated/HeartLock.d.ts +0 -3
  18. package/src/generated/HeartLock.js +0 -25
  19. package/src/generated/HeartLock.tsx +0 -28
  20. package/src/generated/HeartShine.d.ts +0 -3
  21. package/src/generated/HeartShine.js +0 -25
  22. package/src/generated/HeartShine.tsx +0 -35
  23. package/src/generated/HeartUnlock.d.ts +0 -3
  24. package/src/generated/HeartUnlock.js +0 -25
  25. package/src/generated/HeartUnlock.tsx +0 -28
  26. package/src/generated/Hearts.d.ts +0 -3
  27. package/src/generated/Hearts.js +0 -25
  28. package/src/generated/Hearts.tsx +0 -27
  29. package/src/generated/Like.d.ts +0 -3
  30. package/src/generated/Like.js +0 -25
  31. package/src/generated/Like.tsx +0 -27
  32. package/src/generated/MedalRibbon.d.ts +0 -3
  33. package/src/generated/MedalRibbon.js +0 -25
  34. package/src/generated/MedalRibbon.tsx +0 -27
  35. package/src/generated/MedalRibbonStar.d.ts +0 -3
  36. package/src/generated/MedalRibbonStar.js +0 -25
  37. package/src/generated/MedalRibbonStar.tsx +0 -27
  38. package/src/generated/MedalRibbonsStar.d.ts +0 -3
  39. package/src/generated/MedalRibbonsStar.js +0 -25
  40. package/src/generated/MedalRibbonsStar.tsx +0 -27
  41. package/src/generated/MedalStar.d.ts +0 -3
  42. package/src/generated/MedalStar.js +0 -25
  43. package/src/generated/MedalStar.tsx +0 -27
  44. package/src/generated/MedalStarCircle.d.ts +0 -3
  45. package/src/generated/MedalStarCircle.js +0 -25
  46. package/src/generated/MedalStarCircle.tsx +0 -27
  47. package/src/generated/MedalStarSquare.d.ts +0 -3
  48. package/src/generated/MedalStarSquare.js +0 -25
  49. package/src/generated/MedalStarSquare.tsx +0 -27
  50. package/src/generated/Star.d.ts +0 -3
  51. package/src/generated/Star.js +0 -25
  52. package/src/generated/Star.tsx +0 -27
  53. package/src/generated/StarShine.d.ts +0 -3
  54. package/src/generated/StarShine.js +0 -25
  55. package/src/generated/StarShine.tsx +0 -27
  56. package/src/generated/index.d.ts +0 -17
  57. package/src/generated/index.js +0 -37
  58. package/src/generated/index.ts +0 -20
  59. package/src/generated/types.js +0 -2
  60. package/src/generated/types.ts +0 -7
@@ -2,5 +2,5 @@ import type { SVGAttributes } from "react";
2
2
  export interface IconProps extends SVGAttributes<SVGElement> {
3
3
  size?: number;
4
4
  color?: string;
5
- weight?: "outline" | "bold";
5
+ weight?: "bold" | "boldduotone" | "broken" | "lineduotone" | "linear" | "outline";
6
6
  }
package/package.json CHANGED
@@ -1,35 +1,58 @@
1
1
  {
2
2
  "name": "@moamfar/icon-pack",
3
- "version": "1.0.2",
4
- "description": "A collection of beautiful, weight-adjustable SVG icons.",
5
- "main": "./src/generated/index.js",
6
- "module": "./src/generated/index.js",
7
- "types": "./src/generated/index.d.ts",
8
- "sideEffects": false,
3
+ "version": "1.0.4",
4
+ "description": "A collection of beautiful, weight-adjustable SVG React icons.",
5
+ "license": "MIT",
6
+ "author": "Moamfar",
7
+ "homepage": "https://github.com/moamfar/icon-pack",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/moamfar/icon-pack.git"
11
+ },
12
+ "main": "./dist/index.cjs",
13
+ "module": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js",
19
+ "require": "./dist/index.cjs"
20
+ }
21
+ },
9
22
  "files": [
10
- "src/generated",
23
+ "dist",
11
24
  "README.md",
12
25
  "LICENSE"
13
26
  ],
14
- "publishConfig": {
15
- "access": "public"
16
- },
27
+ "sideEffects": false,
17
28
  "scripts": {
29
+ "clean": "rm -rf dist",
18
30
  "build:icons": "node build.js",
19
- "build:types": "cd src/generated",
20
- "build": "npm run build:icons && npm run build:types",
31
+ "build:types": "tsc --emitDeclarationOnly",
32
+ "build": "npm run clean && npm run build:icons && npm run build:types",
21
33
  "readme": "node readme.js",
22
34
  "prepublishOnly": "npm run build && npm run readme"
23
35
  },
36
+ "peerDependencies": {
37
+ "react": ">=16.8"
38
+ },
39
+ "devDependencies": {
40
+ "@types/react": "^19.2.13",
41
+ "typescript": "^5.9.3"
42
+ },
24
43
  "keywords": [
25
44
  "react",
26
45
  "icons",
46
+ "icon-pack",
27
47
  "svg",
28
- "components"
48
+ "phosphor",
49
+ "lucide",
50
+ "ui"
29
51
  ],
30
- "peerDependencies": {
31
- "react": ">=16.x"
52
+ "engines": {
53
+ "node": ">=18"
32
54
  },
33
- "author": "Moamfar",
34
- "license": "MIT"
55
+ "publishConfig": {
56
+ "access": "public"
57
+ }
35
58
  }
package/readme.js CHANGED
@@ -1,334 +1,220 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
3
 
4
- // --- CONFIGURATION ---
4
+ /* ---------------- CONFIG ---------------- */
5
+
5
6
  const packageJsonPath = path.join(__dirname, "package.json");
6
7
  const generatedIndexPath = path.join(__dirname, "src", "generated", "index.ts");
7
8
  const readmeOutputPath = path.join(__dirname, "README.md");
8
- const rawIconsDir = path.join(__dirname, "src", "raw", "outline");
9
+ const rawDir = path.join(__dirname, "src", "raw");
10
+
11
+ const WEIGHTS = ["bold", "boldduotone", "broken", "lineduotone", "linear", "outline"];
12
+
13
+ const weightConfigs = {
14
+ bold: { dir: "bold", label: "Bold" },
15
+ boldduotone: { dir: "boldduotone", label: "Bold Duotone" },
16
+ broken: { dir: "broken", label: "Broken" },
17
+ lineduotone: { dir: "lineduotone", label: "Line Duotone" },
18
+ linear: { dir: "linear", label: "Linear" },
19
+ outline: { dir: "outline", label: "Outline" },
20
+ };
9
21
 
10
- // UPDATE THESE VALUES FOR YOUR REPOSITORY
11
- const GITHUB_USERNAME = "moamfar"; // Replace with your GitHub username
12
- const GITHUB_REPO_NAME = "icon-pack"; // Replace with your repository name
13
- const GITHUB_BRANCH = "main"; // Or "master" depending on your default branch
22
+ const GITHUB_USERNAME = "moamfar";
23
+ const GITHUB_REPO_NAME = "icon-pack";
24
+ const GITHUB_BRANCH = "main";
14
25
 
15
- // --- UTILITIES ---
26
+ /* ---------------- UTILITIES ---------------- */
16
27
 
17
- // 1. Parse index.ts to get component names
28
+ // Parse generated index.ts exports
18
29
  function getExportedComponents(indexPath) {
19
- if (!fs.existsSync(indexPath)) {
20
- console.warn("⚠️ Generated index.ts not found. Run your build script first.");
21
- return [];
22
- }
30
+ if (!fs.existsSync(indexPath)) return [];
31
+
23
32
  const content = fs.readFileSync(indexPath, "utf-8");
24
33
  const regex = /export\s+{\s*(\w+)\s*}\s+from\s+["'].+["'];/g;
34
+
25
35
  const components = [];
26
36
  let match;
27
- while ((match = regex.exec(content)) !== null) {
37
+ while ((match = regex.exec(content))) {
28
38
  components.push(match[1]);
29
39
  }
40
+
30
41
  return components.sort();
31
42
  }
32
43
 
33
- // 2. Find the actual SVG filename (case-insensitive)
34
- function findSvgFilename(componentName) {
35
- // Common naming patterns
36
- const candidates = [
37
- `${componentName}.svg`,
38
- `${componentName.toLowerCase()}.svg`,
39
- `${componentName.charAt(0).toLowerCase() + componentName.slice(1)}.svg`,
40
- `${componentName.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}.svg`,
41
- ];
42
-
43
- for (const filename of candidates) {
44
- const fullPath = path.join(rawIconsDir, filename);
45
- if (fs.existsSync(fullPath)) {
46
- return filename;
47
- }
48
- }
44
+ // Normalize names (remove spaces, lowercase)
45
+ function normalizeName(str) {
46
+ return str.replace(/\s+/g, "").toLowerCase();
47
+ }
49
48
 
50
- // Try to list files and find a match
51
- try {
52
- const files = fs.readdirSync(rawIconsDir);
53
- const svgFiles = files.filter((file) => file.endsWith(".svg"));
54
-
55
- // Try case-insensitive match
56
- const lowerName = componentName.toLowerCase();
57
- for (const file of svgFiles) {
58
- const fileNameWithoutExt = path.basename(file, ".svg").toLowerCase();
59
- if (fileNameWithoutExt === lowerName) {
60
- return file;
61
- }
62
- }
49
+ // Find icon and return GitHub RAW url
50
+ function getGithubIconUrl(componentName, weight) {
51
+ const weightDir = path.join(rawDir, weightConfigs[weight].label);
52
+ if (!fs.existsSync(weightDir)) return null;
53
+
54
+ const normalizedComponent = normalizeName(componentName);
55
+
56
+ const categories = fs.readdirSync(weightDir).filter((f) => fs.statSync(path.join(weightDir, f)).isDirectory());
63
57
 
64
- // Try partial match
65
- for (const file of svgFiles) {
66
- const fileNameWithoutExt = path.basename(file, ".svg").toLowerCase();
67
- if (fileNameWithoutExt.includes(lowerName) || lowerName.includes(fileNameWithoutExt)) {
68
- return file;
58
+ for (const category of categories) {
59
+ const categoryPath = path.join(weightDir, category);
60
+ const files = fs.readdirSync(categoryPath).filter((f) => f.toLowerCase().endsWith(".svg"));
61
+
62
+ for (const file of files) {
63
+ const normalizedFile = normalizeName(file.replace(".svg", ""));
64
+
65
+ if (normalizedFile === normalizedComponent) {
66
+ return `https://raw.githubusercontent.com/${GITHUB_USERNAME}/${GITHUB_REPO_NAME}/${GITHUB_BRANCH}/src/raw/${weightConfigs[weight].label}/${category}/${file}`;
69
67
  }
70
68
  }
71
- } catch (error) {
72
- console.warn(`Could not read directory ${rawIconsDir}:`, error.message);
73
69
  }
74
70
 
75
71
  return null;
76
72
  }
77
73
 
78
- // 3. Get Markdown-formatted icon for README
79
- function getReadmeIcon(componentName) {
80
- const svgFilename = findSvgFilename(componentName);
74
+ /* ---------------- README SECTIONS ---------------- */
81
75
 
82
- if (!svgFilename) {
83
- console.warn(`⚠️ Could not find SVG for component: ${componentName}`);
84
- return `\`${componentName}\``;
85
- }
86
-
87
- // GitHub raw URL format
88
- const githubRawUrl = `https://raw.githubusercontent.com/${GITHUB_USERNAME}/${GITHUB_REPO_NAME}/${GITHUB_BRANCH}/src/raw/outline/${svgFilename}`;
89
-
90
- // Return Markdown image syntax (works on both GitHub and npm)
91
- return `![${componentName}](${githubRawUrl}?sanitize=true)`;
92
- }
93
-
94
- // 4. Generate Markdown Table for Icons
95
76
  function generateIconList(components) {
96
- if (components.length === 0) return "**No icons found.**";
97
-
98
- let markdown = "| Preview | Name | Preview | Name |\n";
99
- markdown += "|:---:|:---|:---:|:---|\n";
100
-
101
- for (let i = 0; i < components.length; i += 2) {
102
- const name1 = components[i];
103
- const name2 = components[i + 2] ? components[i + 2] : components[i + 1]; // Better column distribution
77
+ if (!components.length) return "No icons found.";
78
+
79
+ let html = `
80
+ <table style="border-collapse: collapse; width: 100%; min-width: 700px;">
81
+ <thead>
82
+ <tr style="background:#f8f9fa;border-bottom:2px solid #ddd;">
83
+ <th style="text-align:left;padding:12px;width:35%;">Icon</th>
84
+ <th style="text-align:center;padding:12px;">Weights Preview</th>
85
+ </tr>
86
+ </thead>
87
+ <tbody>
88
+ `;
104
89
 
105
- const icon1 = getReadmeIcon(name1);
106
- const icon2 = name2 ? getReadmeIcon(name2) : "";
90
+ components.forEach((name) => {
91
+ const badges = WEIGHTS.map((w) => {
92
+ const has = getGithubIconUrl(name, w);
93
+ const cfg = weightConfigs[w];
94
+ return `<span style="
95
+ display:inline-block;
96
+ margin:2px;
97
+ padding:2px 8px;
98
+ border-radius:12px;
99
+ font-size:10px;
100
+ border:1px solid ${has ? "#c7d2fe" : "#e5e7eb"};
101
+ background:${has ? "#e0e7ff" : "#f3f4f6"};
102
+ color:${has ? "#4338ca" : "#9ca3af"};
103
+ ">${cfg.label}</span>`;
104
+ }).join("");
105
+
106
+ const previews = WEIGHTS.map((w) => {
107
+ const src = getGithubIconUrl(name, w);
108
+ const label = weightConfigs[w].label.slice(0, 3);
109
+ return src
110
+ ? `<div style="display:flex;flex-direction:column;align-items:center;">
111
+ <img src="${src}" width="20" height="20" />
112
+ <span style="font-size:8px;color:#999;">${label}</span>
113
+ </div>`
114
+ : `<div style="width:20px;height:20px;background:#eee;border-radius:3px;"></div>`;
115
+ }).join("");
116
+
117
+ html += `
118
+ <tr style="border-bottom:1px solid #eee;">
119
+ <td style="padding:12px;">
120
+ <code>${name}</code>
121
+ <div style="margin-top:6px;">${badges}</div>
122
+ </td>
123
+ <td style="padding:12px;">
124
+ <div style="display:flex;gap:8px;justify-content:center;
125
+ background:#fafafa;padding:8px;border-radius:8px;border:1px solid #eee;">
126
+ ${previews}
127
+ </div>
128
+ </td>
129
+ </tr>
130
+ `;
131
+ });
107
132
 
108
- // Add width and height attributes using HTML in Markdown
109
- const icon1WithSize = `<img src="${icon1.replace("![", "").replace("]", "").split("(")[1].replace(")", "")}" width="24" height="24" />`;
110
- const icon2WithSize = icon2
111
- ? `<img src="${icon2.replace("![", "").replace("]", "").split("(")[1].replace(")", "")}" width="24" height="24" />`
112
- : "";
133
+ html += `
134
+ </tbody>
135
+ </table>
136
+ `;
113
137
 
114
- markdown += `| ${icon1WithSize} | \`${name1}\` | ${icon2WithSize} | ${name2 ? `\`${name2}\`` : ""} |\n`;
115
- }
138
+ return html;
139
+ }
116
140
 
117
- return markdown;
141
+ function generateWeightLegend() {
142
+ return `
143
+ ### Weight Legend
144
+
145
+ <div style="display:flex;flex-wrap:wrap;gap:8px;">
146
+ ${WEIGHTS.map(
147
+ (w) => `<div style="padding:6px 10px;border:1px solid #e5e7eb;
148
+ border-radius:6px;background:#f9fafb;">
149
+ <strong>${weightConfigs[w].label}</strong>
150
+ <span style="font-size:12px;color:#666;">( "${w}" )</span>
151
+ </div>`,
152
+ ).join("")}
153
+ </div>
154
+ `;
118
155
  }
119
156
 
120
- // 5. Generate Props Table
121
157
  function generatePropsTable() {
122
158
  return `
123
159
  ## Component Props
124
160
 
125
161
  | Prop | Type | Default | Description |
126
- |------|------|---------|-------------|
127
- | \`size\` | \`number\` | \`24\` | Sets the width and height of the icon |
128
- | \`color\` | \`string\` | \`"currentColor"\` | Sets the fill color |
129
- | \`weight\` | \`"outline" \| "bold"\` | \`"outline"\` | Switches between the icon styles |
130
- | \`...props\` | \`SVGAttributes\` | \`-\` | Standard SVG props like \`className\`, \`id\`, etc. |
162
+ |-----|-----|--------|-------------|
163
+ | size | number | 24 | Icon size |
164
+ | color | string | currentColor | Icon color |
165
+ | weight | string | outline | Icon style |
166
+ | ...props | SVGAttributes | | Standard SVG props |
131
167
  `;
132
168
  }
133
169
 
134
- // 6. Generate Installation Section
135
- function generateInstallationSection(pkgName) {
170
+ function generateUsage(pkgName, example) {
136
171
  return `
137
- ## Installation
138
-
139
- \`\`\`bash
140
- npm install ${pkgName}
141
- \`\`\`
142
-
143
- or
144
-
145
- \`\`\`bash
146
- yarn add ${pkgName}
147
- \`\`\`
148
-
149
- or
150
-
151
- \`\`\`bash
152
- pnpm add ${pkgName}
153
- \`\`\`
154
- `;
155
- }
156
-
157
- // 7. Generate Usage Examples
158
- function generateUsageExamples(pkgName, components) {
159
- const exampleComponents = components.slice(0, 3);
160
-
161
- if (exampleComponents.length < 3) {
162
- return `
163
172
  ## Usage
164
173
 
165
- Import the icons you need and use them as React components:
166
-
167
174
  \`\`\`tsx
168
- import { ${exampleComponents.join(", ")} } from "${pkgName}";
175
+ import { ${example} } from "${pkgName}";
169
176
 
170
- function App() {
171
- return (
172
- <div>
173
- ${exampleComponents.map((comp) => `<${comp} size={32} color="#333" />`).join("\n ")}
174
- </div>
175
- );
176
- }
177
+ <${example} size={32} weight="bold" color="#4f46e5" />
177
178
  \`\`\`
178
179
  `;
179
- }
180
-
181
- return `
182
- ## Usage
183
-
184
- Import the icons you need and use them as React components:
185
-
186
- \`\`\`tsx
187
- import { ${exampleComponents[0]}, ${exampleComponents[1]}, ${exampleComponents[2]} } from "${pkgName}";
188
-
189
- function App() {
190
- return (
191
- <div>
192
- <${exampleComponents[0]} size={32} color="#333" />
193
- <${exampleComponents[1]} size={32} color="blue" weight="bold" />
194
- <${exampleComponents[2]} size={48} className="text-red-500" />
195
- </div>
196
- );
197
180
  }
198
- \`\`\`
199
181
 
200
- For TypeScript users, types are included out of the box.
201
- `;
202
- }
203
-
204
- // --- MAIN LOGIC ---
182
+ /* ---------------- MAIN ---------------- */
205
183
 
206
184
  try {
207
- console.log("📦 Starting README generation...");
208
-
209
- // 1. Load Package Metadata
210
- let pkgName = "my-icon-pack";
211
- let pkgDesc = "A collection of beautiful SVG icons.";
212
- let pkgVersion = "1.0.0";
213
- let pkgLicense = "MIT";
214
-
215
- if (fs.existsSync(packageJsonPath)) {
216
- const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
217
- pkgName = pkg.name || pkgName;
218
- pkgDesc = pkg.description || pkgDesc;
219
- pkgVersion = pkg.version || pkgVersion;
220
- pkgLicense = pkg.license || pkgLicense;
221
- } else {
222
- console.warn("⚠️ package.json not found. Using default values.");
223
- }
224
-
225
- // 2. Get Component List
226
- console.log("📋 Getting component list...");
185
+ const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
227
186
  const components = getExportedComponents(generatedIndexPath);
228
187
 
229
- if (components.length === 0) {
230
- console.warn("⚠️ No components found. The index.ts file might be empty or the build hasn't been run.");
231
- } else {
232
- console.log(`✅ Found ${components.length} components`);
233
- }
234
-
235
- // 3. Generate Sections
236
- console.log("🛠️ Generating README sections...");
237
- const iconListSection = generateIconList(components);
238
- const propsTableSection = generatePropsTable();
239
- const installationSection = generateInstallationSection(pkgName);
240
- const usageSection = generateUsageExamples(pkgName, components);
241
-
242
- // 4. Construct README Content
243
- console.log("📝 Assembling README...");
244
- const readmeContent = `# ${pkgName}
245
-
246
- ![npm downloads](https://img.shields.io/npm/dm/${pkgName}.svg)
247
- ![bundle size](https://img.shields.io/bundlephobia/minzip/${pkgName})
248
- ![license](https://img.shields.io/npm/l/${pkgName}.svg)
249
- ![TypeScript](https://img.shields.io/badge/TypeScript-✓-blue)
250
-
251
- ${pkgDesc}
252
-
253
- ## Features
254
-
255
- - **🌳 Tree-shakable:** Only import the icons you use
256
- - **🎨 Customizable:** Control size, color, and weight (Outline/Bold) easily
257
- - **✨ TypeScript:** Built with full type safety support
258
- - **🛠 Framework Agnostic:** Works with React, Next.js, Vite, and CRA
259
- - **⚡ Zero Dependencies:** Lightweight footprint
260
- - **🎯 Perfect for Design Systems:** Consistent and scalable
261
-
262
- ${installationSection}
263
-
264
- ${usageSection}
265
-
266
- ${propsTableSection}
188
+ const readme = `
189
+ # ${pkg.name}
267
190
 
268
- ## Available Icons
191
+ ${pkg.description}
269
192
 
270
- There are currently **${components.length}** icons available:
193
+ ${generateWeightLegend()}
271
194
 
272
- ${iconListSection}
273
-
274
- ## Contributing
275
-
276
- We welcome contributions! If you'd like to add new icons or improve existing ones:
277
-
278
- 1. Fork the repository
279
- 2. Create a new branch
280
- 3. Add your SVG icons to the \`src/raw/outline/\` directory
281
- 4. Run the build script to generate components
282
- 5. Submit a pull request
283
-
284
- ## Development
285
-
286
- To build the project locally:
195
+ ## Installation
287
196
 
288
197
  \`\`\`bash
289
- # Clone the repository
290
- git clone https://github.com/${GITHUB_USERNAME}/${GITHUB_REPO_NAME}.git
291
-
292
- # Install dependencies
293
- npm install
294
-
295
- # Build the project
296
- npm run build
297
-
298
- # Generate the README (this file)
299
- npm run generate-readme
198
+ npm install ${pkg.name}
300
199
  \`\`\`
301
200
 
302
- ## Related Projects
201
+ ${components.length ? generateUsage(pkg.name, components[0]) : ""}
303
202
 
304
- - [React Icons](https://react-icons.github.io/react-icons/) - Popular icon library
305
- - [Lucide](https://lucide.dev/) - Beautiful & consistent icon toolkit
306
- - [Heroicons](https://heroicons.com/) - Handcrafted SVG icons
203
+ ${generatePropsTable()}
307
204
 
308
- ## License
205
+ ## Available Icons (${components.length})
309
206
 
310
- ${pkgLicense} © ${new Date().getFullYear()} ${GITHUB_USERNAME}. See the [LICENSE](./LICENSE) file for details.
207
+ ${generateIconList(components)}
311
208
 
312
209
  ---
313
210
 
314
- <div align="center">
315
- Made with ❤️ by <a href="https://github.com/${GITHUB_USERNAME}">${GITHUB_USERNAME}</a>
316
- </div>
211
+ Made with ❤️ by **${GITHUB_USERNAME}**
317
212
  `;
318
213
 
319
- // 5. Write to file
320
- fs.writeFileSync(readmeOutputPath, readmeContent);
321
- console.log(`✅ README.md generated successfully at: ${readmeOutputPath}`);
322
- console.log(`📊 Total icons documented: ${components.length}`);
323
- console.log(`🔗 GitHub URL: https://github.com/${GITHUB_USERNAME}/${GITHUB_REPO_NAME}`);
324
-
325
- // 6. Print next steps
326
- console.log("\n📋 NEXT STEPS:");
327
- console.log("1. Update GITHUB_USERNAME and GITHUB_REPO_NAME at the top of this script");
328
- console.log("2. Commit and push your SVG files to GitHub");
329
- console.log("3. Verify images work by checking the README on GitHub");
330
- } catch (error) {
331
- console.error("❌ Error generating README:");
332
- console.error(error);
214
+ fs.writeFileSync(readmeOutputPath, readme.trim());
215
+ console.log("✅ README.md generated successfully");
216
+ } catch (err) {
217
+ console.error("❌ Failed to generate README");
218
+ console.error(err);
333
219
  process.exit(1);
334
220
  }
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- import { IconProps } from "./types";
3
- export declare const Dislike: React.FC<IconProps>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.Dislike = void 0;
15
- var React = require("react");
16
- var Dislike = function (_a) {
17
- var _b = _a.size, size = _b === void 0 ? 24 : _b, _c = _a.color, color = _c === void 0 ? "currentColor" : _c, _d = _a.weight, weight = _d === void 0 ? "outline" : _d, props = __rest(_a, ["size", "color", "weight"]);
18
- var availableWeights = ["outline"];
19
- var activeWeight = availableWeights.includes(weight) ? weight : availableWeights[0];
20
- return (<svg viewBox="0 0 24 24" width={size} height={size} fill={color} {...props}>
21
- {activeWeight === 'bold' && (<g dangerouslySetInnerHTML={{ __html: "" }}/>)}
22
- {activeWeight === 'outline' && (<g dangerouslySetInnerHTML={{ __html: "\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4382 21.2216C12.2931 21.2682 12.1345 21.2569 11.9998 21.192C11.8523 21.1209 11.7548 20.9968 11.7197 20.8618L11.244 19.0279C11.0777 18.3866 10.8354 17.768 10.5235 17.184C10.0392 16.2773 9.30632 15.58 8.62647 14.9942L7.18773 13.7544C6.96475 13.5622 6.8474 13.2742 6.87282 12.9802L7.68498 3.58754C7.72601 3.11303 8.12244 2.75 8.59635 2.75H13.245C16.3813 2.75 19.0238 4.93226 19.5306 7.86285L20.2361 11.9426C20.3332 12.5041 19.9014 13.0158 19.3348 13.0158H14.1537C13.1766 13.0158 12.4344 13.8924 12.5921 14.8553L13.2548 18.8998C13.3456 19.4539 13.3197 20.0208 13.1787 20.5642C13.1072 20.8399 12.8896 21.0766 12.5832 21.175L12.4382 21.2216L12.6676 21.9356L12.4382 21.2216ZM11.3486 22.5433C11.8312 22.7758 12.3873 22.8135 12.897 22.6497L13.042 22.6031L12.8126 21.8891L13.042 22.6031C13.819 22.3535 14.4252 21.7328 14.6307 20.9408C14.8241 20.1952 14.8596 19.4174 14.7351 18.6573L14.0724 14.6128C14.0639 14.561 14.1038 14.5158 14.1537 14.5158H19.3348C20.8341 14.5158 21.9695 13.1635 21.7142 11.687L21.0087 7.60725C20.3708 3.91896 17.0712 1.25 13.245 1.25H8.59635C7.3427 1.25 6.29852 2.20975 6.19056 3.45832L5.3784 12.851C5.31149 13.6247 5.62022 14.3837 6.20855 14.8907L7.64729 16.1305C8.3025 16.6951 8.85404 17.2423 9.20042 17.8908C9.45699 18.3711 9.65573 18.8789 9.79208 19.4046L10.2678 21.2384C10.417 21.8137 10.8166 22.2869 11.3486 22.5433ZM2.96767 14.5151C3.36893 14.5324 3.71261 14.2306 3.74721 13.8304L4.71881 2.59389C4.78122 1.8721 4.21268 1.25 3.48671 1.25C2.80289 1.25 2.25 1.80474 2.25 2.48726V13.7658C2.25 14.1674 2.5664 14.4978 2.96767 14.5151Z\"/>\n</svg>\n" }}/>)}
23
- </svg>);
24
- };
25
- exports.Dislike = Dislike;
@@ -1,27 +0,0 @@
1
- import * as React from "react";
2
- import { IconProps } from "./types";
3
-
4
- export const Dislike: React.FC<IconProps> = ({ size = 24, color = "currentColor", weight = "outline", ...props }) => {
5
- const availableWeights = ["outline"];
6
- const activeWeight = availableWeights.includes(weight) ? weight : availableWeights[0];
7
-
8
- return (
9
- <svg
10
- viewBox="0 0 24 24"
11
- width={size}
12
- height={size}
13
- fill={color}
14
- {...props}
15
- >
16
- {activeWeight === 'bold' && (
17
- <g dangerouslySetInnerHTML={{ __html: `` }} />
18
- )}
19
- {activeWeight === 'outline' && (
20
- <g dangerouslySetInnerHTML={{ __html: `
21
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4382 21.2216C12.2931 21.2682 12.1345 21.2569 11.9998 21.192C11.8523 21.1209 11.7548 20.9968 11.7197 20.8618L11.244 19.0279C11.0777 18.3866 10.8354 17.768 10.5235 17.184C10.0392 16.2773 9.30632 15.58 8.62647 14.9942L7.18773 13.7544C6.96475 13.5622 6.8474 13.2742 6.87282 12.9802L7.68498 3.58754C7.72601 3.11303 8.12244 2.75 8.59635 2.75H13.245C16.3813 2.75 19.0238 4.93226 19.5306 7.86285L20.2361 11.9426C20.3332 12.5041 19.9014 13.0158 19.3348 13.0158H14.1537C13.1766 13.0158 12.4344 13.8924 12.5921 14.8553L13.2548 18.8998C13.3456 19.4539 13.3197 20.0208 13.1787 20.5642C13.1072 20.8399 12.8896 21.0766 12.5832 21.175L12.4382 21.2216L12.6676 21.9356L12.4382 21.2216ZM11.3486 22.5433C11.8312 22.7758 12.3873 22.8135 12.897 22.6497L13.042 22.6031L12.8126 21.8891L13.042 22.6031C13.819 22.3535 14.4252 21.7328 14.6307 20.9408C14.8241 20.1952 14.8596 19.4174 14.7351 18.6573L14.0724 14.6128C14.0639 14.561 14.1038 14.5158 14.1537 14.5158H19.3348C20.8341 14.5158 21.9695 13.1635 21.7142 11.687L21.0087 7.60725C20.3708 3.91896 17.0712 1.25 13.245 1.25H8.59635C7.3427 1.25 6.29852 2.20975 6.19056 3.45832L5.3784 12.851C5.31149 13.6247 5.62022 14.3837 6.20855 14.8907L7.64729 16.1305C8.3025 16.6951 8.85404 17.2423 9.20042 17.8908C9.45699 18.3711 9.65573 18.8789 9.79208 19.4046L10.2678 21.2384C10.417 21.8137 10.8166 22.2869 11.3486 22.5433ZM2.96767 14.5151C3.36893 14.5324 3.71261 14.2306 3.74721 13.8304L4.71881 2.59389C4.78122 1.8721 4.21268 1.25 3.48671 1.25C2.80289 1.25 2.25 1.80474 2.25 2.48726V13.7658C2.25 14.1674 2.5664 14.4978 2.96767 14.5151Z"/>
22
- </svg>
23
- ` }} />
24
- )}
25
- </svg>
26
- );
27
- };
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- import { IconProps } from "./types";
3
- export declare const Heart: React.FC<IconProps>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.Heart = void 0;
15
- var React = require("react");
16
- var Heart = function (_a) {
17
- var _b = _a.size, size = _b === void 0 ? 24 : _b, _c = _a.color, color = _c === void 0 ? "currentColor" : _c, _d = _a.weight, weight = _d === void 0 ? "outline" : _d, props = __rest(_a, ["size", "color", "weight"]);
18
- var availableWeights = ["outline"];
19
- var activeWeight = availableWeights.includes(weight) ? weight : availableWeights[0];
20
- return (<svg viewBox="0 0 24 24" width={size} height={size} fill={color} {...props}>
21
- {activeWeight === 'bold' && (<g dangerouslySetInnerHTML={{ __html: "" }}/>)}
22
- {activeWeight === 'outline' && (<g dangerouslySetInnerHTML={{ __html: "\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.62436 4.4241C3.96537 5.18243 2.75 6.98614 2.75 9.13701C2.75 11.3344 3.64922 13.0281 4.93829 14.4797C6.00072 15.676 7.28684 16.6675 8.54113 17.6345C8.83904 17.8642 9.13515 18.0925 9.42605 18.3218C9.95208 18.7365 10.4213 19.1004 10.8736 19.3647C11.3261 19.6292 11.6904 19.7499 12 19.7499C12.3096 19.7499 12.6739 19.6292 13.1264 19.3647C13.5787 19.1004 14.0479 18.7365 14.574 18.3218C14.8649 18.0925 15.161 17.8642 15.4589 17.6345C16.7132 16.6675 17.9993 15.676 19.0617 14.4797C20.3508 13.0281 21.25 11.3344 21.25 9.13701C21.25 6.98614 20.0346 5.18243 18.3756 4.4241C16.7639 3.68739 14.5983 3.88249 12.5404 6.02065C12.399 6.16754 12.2039 6.25054 12 6.25054C11.7961 6.25054 11.601 6.16754 11.4596 6.02065C9.40166 3.88249 7.23607 3.68739 5.62436 4.4241ZM12 4.45873C9.68795 2.39015 7.09896 2.10078 5.00076 3.05987C2.78471 4.07284 1.25 6.42494 1.25 9.13701C1.25 11.8025 2.3605 13.836 3.81672 15.4757C4.98287 16.7888 6.41022 17.8879 7.67083 18.8585C7.95659 19.0785 8.23378 19.292 8.49742 19.4998C9.00965 19.9036 9.55954 20.3342 10.1168 20.6598C10.6739 20.9853 11.3096 21.2499 12 21.2499C12.6904 21.2499 13.3261 20.9853 13.8832 20.6598C14.4405 20.3342 14.9903 19.9036 15.5026 19.4998C15.7662 19.292 16.0434 19.0785 16.3292 18.8585C17.5898 17.8879 19.0171 16.7888 20.1833 15.4757C21.6395 13.836 22.75 11.8025 22.75 9.13701C22.75 6.42494 21.2153 4.07284 18.9992 3.05987C16.901 2.10078 14.3121 2.39015 12 4.45873Z\"/>\n</svg>\n" }}/>)}
23
- </svg>);
24
- };
25
- exports.Heart = Heart;