@generation/icons 1.1.3 → 1.1.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/.circleci/config.yml +61 -3
- package/dist/index.js +1 -1
- package/package.json +3 -2
- package/packages/demo/image.png +0 -0
- package/packages/demo/package-lock.json +4 -4
- package/packages/demo/package.json +1 -1
- package/packages/demo/src/components/Gallery/Gallery.jsx +373 -3
- package/scripts/create-full.mjs +46 -0
- package/src/Icons/{Link.jsx → LinkIcon.jsx} +2 -2
- package/src/Icons/index.js +1 -1
- /package/assets/{link.svg → link-icon.svg} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
const iconsFolder = './src/Icons'; // Carpeta donde están los iconos
|
|
5
|
+
const galleryFilePath = './packages/demo/src/components/Gallery/Gallery.jsx'; // Ruta del archivo Gallery.jsx
|
|
6
|
+
|
|
7
|
+
// Leer el archivo index.js
|
|
8
|
+
const indexPath = path.join(iconsFolder, 'index.js');
|
|
9
|
+
const indexContent = fs.readFileSync(indexPath, 'utf8');
|
|
10
|
+
|
|
11
|
+
// Extraer los nombres de los íconos de los exports en index.js
|
|
12
|
+
const iconNames = Array.from(
|
|
13
|
+
indexContent.matchAll(/export\s+{\s+default\s+as\s+(\w+)\s+}/g),
|
|
14
|
+
(match) => match[1]
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
// Construir el contenido del archivo Gallery.jsx
|
|
18
|
+
const galleryContent = `
|
|
19
|
+
import React from 'react';
|
|
20
|
+
import './styles.css';
|
|
21
|
+
import {
|
|
22
|
+
${iconNames.join(',\n ')}
|
|
23
|
+
} from '@generation/icons';
|
|
24
|
+
|
|
25
|
+
const Gallery = () => (
|
|
26
|
+
<div className="gallery">
|
|
27
|
+
${iconNames
|
|
28
|
+
.map(
|
|
29
|
+
(icon) => `
|
|
30
|
+
<div className="gallery-item">
|
|
31
|
+
<div className="gallery-svg">
|
|
32
|
+
<${icon} />
|
|
33
|
+
</div>
|
|
34
|
+
<span>${icon}</span>
|
|
35
|
+
</div>`
|
|
36
|
+
)
|
|
37
|
+
.join('\n ')}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export default Gallery;
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
// Crear el archivo Gallery.jsx
|
|
45
|
+
fs.writeFileSync(galleryFilePath, galleryContent, 'utf8');
|
|
46
|
+
console.log(`Gallery.jsx creado en ${galleryFilePath}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
const
|
|
2
|
+
const LinkIcon = (props) => (
|
|
3
3
|
<svg
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
5
5
|
width="1em"
|
|
@@ -11,4 +11,4 @@ const Link = (props) => (
|
|
|
11
11
|
<path d="M15.31 0h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8h-4c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V0h-4c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2h-8zm9-4h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8h-4c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V0h-4c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2h-8z" />
|
|
12
12
|
</svg>
|
|
13
13
|
);
|
|
14
|
-
export default
|
|
14
|
+
export default LinkIcon;
|
package/src/Icons/index.js
CHANGED
|
@@ -200,7 +200,7 @@ export { default as JobFill } from './JobFill';
|
|
|
200
200
|
export { default as JobFillOut } from './JobFillOut';
|
|
201
201
|
export { default as LeftArrow } from './LeftArrow';
|
|
202
202
|
export { default as LeftCaret } from './LeftCaret';
|
|
203
|
-
export { default as
|
|
203
|
+
export { default as LinkIcon } from './LinkIcon';
|
|
204
204
|
export { default as Linkedin } from './Linkedin';
|
|
205
205
|
export { default as List } from './List';
|
|
206
206
|
export { default as ListOl } from './ListOl';
|
|
File without changes
|