@nikaat-crop/es-icons 0.190.3 → 0.190.5

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
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nikaat-crop/es-icons",
3
- "version": "0.190.3",
3
+ "version": "0.190.5",
4
4
  "description": "A comprehensive collection of beautiful and modern SVG icons specifically designed for Skenas (اسکناس) project, featuring 160+ carefully crafted financial and service icons with TypeScript support.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
9
  "build": "rollup -c --bundleConfigAsCjs",
10
- "publish": "rimraf dist && rollup -c --bundleConfigAsCjs && npm publish --access public",
10
+ "publish:npm": "rimraf dist && rollup -c --bundleConfigAsCjs && npm publish --access public",
11
11
  "icons:generate": "node script/svgr-convert-only-new.js",
12
12
  "storybook": "storybook dev -p 6006",
13
13
  "build-storybook": "storybook build"
@@ -1,28 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { execSync } = require('child_process');
4
-
5
- const svgsDir = path.resolve('src/svgs');
6
- const outputDir = path.resolve('src/icons');
7
-
8
- const svgFiles = fs.readdirSync(svgsDir).filter(f => f.endsWith('.svg'));
9
-
10
- svgFiles.forEach(file => {
11
- const baseName = path.basename(file, '.svg');
12
- const outFile = path.join(outputDir, `${baseName}.tsx`);
13
-
14
- if (fs.existsSync(outFile)) {
15
- console.log(`⏩ Skipping existing icon: ${baseName}`);
16
- return;
17
- }
18
-
19
- const inputPath = path.join(svgsDir, file);
20
- const cmd = `svgr --icon --typescript --filename-case kebab --replace-attr-values "#000=currentColor" --out-dir ${outputDir} ${inputPath}`;
21
-
22
- try {
23
- execSync(cmd, { stdio: 'inherit' });
24
- console.log(`✅ Generated icon: ${baseName}`);
25
- } catch (error) {
26
- console.error(`❌ Failed to generate ${baseName}:`, error.message);
27
- }
28
- });
@@ -1,26 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const ICONS_DIR = path.resolve(__dirname, '../src/icons');
5
- const INDEX_FILE = path.join(ICONS_DIR, '../index.ts');
6
-
7
- // Get all .tsx files
8
- const files = fs.readdirSync(ICONS_DIR).filter(f => f.endsWith('.tsx'));
9
-
10
- // Generate PascalCase export statements
11
- const exportLines = files.map(file => {
12
- const name = path.basename(file, '.tsx');
13
- const exportName = toPascalCase(name);
14
- return `export { default as ${exportName} } from './icons/${name}';`;
15
- });
16
-
17
- // Write to index.ts
18
- fs.writeFileSync(INDEX_FILE, exportLines.join('\n') + '\n');
19
- console.log('✅ index.ts updated.');
20
-
21
- function toPascalCase(str) {
22
- return str
23
- .split(/[-_]/)
24
- .map(s => s.charAt(0).toUpperCase() + s.slice(1))
25
- .join('');
26
- }