@vezham/icons-vscode 1.0.0 → 1.0.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@vezham/icons-vscode",
3
3
  "displayName": "Reicon — Open Source SVG Icon Library",
4
4
  "description": "Browse and insert 2,700+ handcrafted Reicon SVG icons directly into your HTML, React, Vue, Svelte, or vanilla JS code. Outlined and filled styles available.",
5
- "version": "1.0.0",
5
+ "version": "1.0.2",
6
6
  "publisher": "DevChauhan",
7
7
  "engines": {
8
8
  "vscode": "^1.80.0"
@@ -15,7 +15,6 @@
15
15
  "heroicons",
16
16
  "icon picker",
17
17
  "icon browser",
18
- "reicon",
19
18
  "vue-icons",
20
19
  "svelte-icons",
21
20
  "outline icons",
@@ -54,6 +53,14 @@
54
53
  "homepage": "https://vezham.com",
55
54
  "activationEvents": [],
56
55
  "main": "./extension.js",
56
+ "files": [
57
+ "dist",
58
+ "extension.js",
59
+ "resources",
60
+ "README.md",
61
+ "CHANGELOG.md",
62
+ "LICENSE"
63
+ ],
57
64
  "contributes": {
58
65
  "viewsContainers": {
59
66
  "activitybar": [
package/.vscodeignore DELETED
@@ -1,3 +0,0 @@
1
- .gitignore
2
- src/
3
- scripts/
package/scripts/build.cjs DELETED
@@ -1,93 +0,0 @@
1
- #!/usr/bin/env node
2
- const fs = require('fs');
3
- const path = require('path');
4
-
5
- const DATA_PATH = path.join(__dirname, '..', '..', '..', 'data', 'icon-data.json');
6
- const TEMPLATE_HTML_PATH = path.join(__dirname, '..', 'src', 'ui.html');
7
- const OUTPUT_HTML_PATH = path.join(__dirname, '..', 'dist', 'ui.html');
8
- const LOGO_PATH = path.join(__dirname, '..', '..', '..', 'public', 'apple-touch-icon.png');
9
-
10
- console.log('Compiling Reicon VS Code icons database and inlining into ui.html...');
11
-
12
- try {
13
- if (!fs.existsSync(DATA_PATH)) {
14
- throw new Error(`Data file not found at ${DATA_PATH}`);
15
- }
16
- if (!fs.existsSync(TEMPLATE_HTML_PATH)) {
17
- throw new Error(`Template HTML file not found at ${TEMPLATE_HTML_PATH}`);
18
- }
19
-
20
- const rawData = JSON.parse(fs.readFileSync(DATA_PATH, 'utf-8'));
21
- const compactData = {};
22
- const categoriesList = [];
23
-
24
- if (rawData.categories) {
25
- for (const [catKey, catData] of Object.entries(rawData.categories)) {
26
- categoriesList.push({
27
- id: catKey,
28
- name: catData.name || catKey.charAt(0).toUpperCase() + catKey.slice(1)
29
- });
30
-
31
- for (const [iconKey, icon] of Object.entries(catData.icons || {})) {
32
- const weights = {};
33
- if (icon.weights) {
34
- if (icon.weights.Outline && icon.weights.Outline.code) {
35
- weights.Outline = icon.weights.Outline.code;
36
- }
37
- if (icon.weights.Filled && icon.weights.Filled.code) {
38
- weights.Filled = icon.weights.Filled.code;
39
- }
40
- }
41
-
42
- // Only include icon if it has at least one weight
43
- if (Object.keys(weights).length > 0) {
44
- compactData[iconKey] = {
45
- category: catKey,
46
- weights: weights,
47
- description: icon.description || []
48
- };
49
- }
50
- }
51
- }
52
- }
53
-
54
- // Load logo as base64
55
- let logoBase64 = '';
56
- if (fs.existsSync(LOGO_PATH)) {
57
- const logoBuffer = fs.readFileSync(LOGO_PATH);
58
- logoBase64 = `data:image/png;base64,${logoBuffer.toString('base64')}`;
59
- }
60
-
61
- // Read the HTML template
62
- let templateContent = fs.readFileSync(TEMPLATE_HTML_PATH, 'utf-8');
63
-
64
- // Replace placeholders
65
- templateContent = templateContent.replace(/__REICON_LOGO_BASE64__/g, logoBase64);
66
-
67
- // Create inline scripts
68
- const inlineScripts = `
69
- <script>
70
- window.REICON_DATA = ${JSON.stringify(compactData)};
71
- window.REICON_CATEGORIES = ${JSON.stringify(categoriesList)};
72
- </script>
73
- `;
74
-
75
- // Inject before the closing </head> or at placeholder
76
- if (templateContent.includes('<!-- INJECT_ICONS_DATA -->')) {
77
- templateContent = templateContent.replace('<!-- INJECT_ICONS_DATA -->', inlineScripts);
78
- } else {
79
- templateContent = templateContent.replace('</head>', `${inlineScripts}\n</head>`);
80
- }
81
-
82
- // Ensure output directory exists
83
- const outputDir = path.dirname(OUTPUT_HTML_PATH);
84
- if (!fs.existsSync(outputDir)) {
85
- fs.mkdirSync(outputDir, { recursive: true });
86
- }
87
-
88
- fs.writeFileSync(OUTPUT_HTML_PATH, templateContent, 'utf-8');
89
- console.log(`Successfully compiled ${Object.keys(compactData).length} icons directly into ${OUTPUT_HTML_PATH}`);
90
- } catch (error) {
91
- console.error('Error compiling VS Code extension UI:', error);
92
- process.exit(1);
93
- }