holygrail5 1.0.19 → 1.0.21

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 (77) hide show
  1. package/README.md +88 -18
  2. package/config.json +205 -77
  3. package/dist/assets/fonts/suisse-intl-light.woff +0 -0
  4. package/dist/assets/fonts/suisse-intl-light.woff2 +0 -0
  5. package/dist/assets/fonts/suisse-intl-medium.woff +0 -0
  6. package/dist/assets/fonts/suisse-intl-medium.woff2 +0 -0
  7. package/dist/assets/fonts/suisse-intl-regular.woff +0 -0
  8. package/dist/assets/fonts/suisse-intl-regular.woff2 +0 -0
  9. package/dist/assets/fonts/suisse-intl-semibold.woff +0 -0
  10. package/dist/assets/fonts/suisse-intl-semibold.woff2 +0 -0
  11. package/dist/assets/fonts/suisse-works-bold.woff +0 -0
  12. package/dist/assets/fonts/suisse-works-bold.woff2 +0 -0
  13. package/dist/assets/fonts/suisse-works-medium.woff +0 -0
  14. package/dist/assets/fonts/suisse-works-medium.woff2 +0 -0
  15. package/dist/assets/fonts/suisse-works-regular.woff +0 -0
  16. package/dist/assets/fonts/suisse-works-regular.woff2 +0 -0
  17. package/dist/componentes.html +429 -0
  18. package/dist/developer-guide.md +7 -7
  19. package/dist/guide-styles.css +197 -25
  20. package/dist/index.html +807 -689
  21. package/dist/output.css +217 -114
  22. package/dist/skills.html +14 -8
  23. package/dist/themes/dutti-demo.html +713 -19
  24. package/dist/themes/dutti.css +67 -16
  25. package/dist/themes/limited-demo.html +1121 -0
  26. package/dist/themes/limited.css +2493 -0
  27. package/package.json +1 -1
  28. package/src/.data/.previous-values.json +151 -84
  29. package/src/assets/fonts/suisse-intl-light.woff +0 -0
  30. package/src/assets/fonts/suisse-intl-light.woff2 +0 -0
  31. package/src/assets/fonts/suisse-intl-medium.woff +0 -0
  32. package/src/assets/fonts/suisse-intl-medium.woff2 +0 -0
  33. package/src/assets/fonts/suisse-intl-regular.woff +0 -0
  34. package/src/assets/fonts/suisse-intl-regular.woff2 +0 -0
  35. package/src/assets/fonts/suisse-intl-semibold.woff +0 -0
  36. package/src/assets/fonts/suisse-intl-semibold.woff2 +0 -0
  37. package/src/assets/fonts/suisse-works-bold.woff +0 -0
  38. package/src/assets/fonts/suisse-works-bold.woff2 +0 -0
  39. package/src/assets/fonts/suisse-works-medium.woff +0 -0
  40. package/src/assets/fonts/suisse-works-medium.woff2 +0 -0
  41. package/src/assets/fonts/suisse-works-regular.woff +0 -0
  42. package/src/assets/fonts/suisse-works-regular.woff2 +0 -0
  43. package/src/build/asset-manager.js +94 -3
  44. package/src/build/build-orchestrator.js +74 -12
  45. package/src/build/components-generator.js +584 -0
  46. package/src/build/skills-generator.js +43 -5
  47. package/src/build/theme-config-loader.js +58 -0
  48. package/src/build/theme-transformer.js +109 -16
  49. package/src/build/theme-vars-table-generator.js +349 -0
  50. package/src/build/typo-table-generator.js +154 -0
  51. package/src/docs-generator/guide-styles.css +197 -24
  52. package/src/docs-generator/html-generator.js +92 -246
  53. package/src/docs-generator/sections/colors-section.js +109 -0
  54. package/src/docs-generator/value-tracker.js +154 -0
  55. package/src/generators/typo-generator.js +2 -1
  56. package/src/generators/utils.js +90 -1
  57. package/src/skills.html +1 -0
  58. package/src/watch-config.js +99 -32
  59. package/themes/{dutti → _base}/_buttons.css +2 -2
  60. package/themes/{dutti → _base}/_checkboxes.css +1 -1
  61. package/themes/{dutti → _base}/_forms.css +1 -1
  62. package/themes/{dutti → _base}/_inputs.css +55 -10
  63. package/themes/{dutti → _base}/_labels.css +1 -1
  64. package/themes/dutti/README.md +67 -21
  65. package/themes/dutti/_variables.css +7 -1
  66. package/themes/dutti/demo.html +18 -14
  67. package/themes/dutti/theme.css +22 -44
  68. package/themes/dutti/theme.json +86 -0
  69. package/themes/limited/_variables.css +123 -0
  70. package/themes/limited/demo.html +296 -0
  71. package/themes/limited/theme.css +32 -0
  72. package/themes/limited/theme.json +105 -0
  73. /package/themes/{dutti → _base}/_containers.css +0 -0
  74. /package/themes/{dutti → _base}/_radios.css +0 -0
  75. /package/themes/{dutti → _base}/_switches.css +0 -0
  76. /package/themes/{dutti → _base}/components/_icons.css +0 -0
  77. /package/themes/{dutti → _base}/objects/_grid.css +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holygrail5",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Framework CSS generator con Node.js - Genera CSS optimizado con variables CSS desde un archivo JSON de configuración",
5
5
  "main": "generate-css.js",
6
6
  "style": "dist/output.css",
@@ -4,9 +4,10 @@
4
4
  "desktop": "992px"
5
5
  },
6
6
  "fontFamilyMap": {
7
- "primary": "arial, sans-serif",
8
- "primary-bold": "\"Arial Bold\", Arial, sans-serif",
9
- "secondary": "\"ms-serif\", serif"
7
+ "primary-light": "\"suisse-light\", Arial, Helvetica, sans-serif",
8
+ "primary-regular": "\"suisse-regular\", Arial, Helvetica, sans-serif",
9
+ "primary-bold": "\"suisse-semibold\", Arial, Helvetica, sans-serif",
10
+ "secondary": "\"suisse-medium\", Arial, Helvetica, sans-serif"
10
11
  },
11
12
  "spacingMap": {
12
13
  "0": "0",
@@ -54,32 +55,39 @@
54
55
  "orange": "#B75D0B",
55
56
  "mustard": "#FFE693",
56
57
  "primary": "#000000",
57
- "error": "#b40016",
58
- "info": "#1a32a4",
58
+ "error": "#dd2d01",
59
+ "info": "#2037a6",
59
60
  "success": "#12882C",
60
- "warning": "#ffc700",
61
+ "warning": "#ffce4e",
61
62
  "feel": "#fb9962",
62
63
  "feel-dark": "#c94c07",
63
- "special": "#b99d6b",
64
- "vanilla": "#F4F2ED",
65
64
  "silver": "#87888D",
66
65
  "gold": "#A38A6B",
67
66
  "platinum": "#5B7FA1",
68
- "charcoal": "#1D1D1D",
69
- "bg-light": "#F0F0F0",
70
- "c-bg-light": "#000000",
71
- "sk-grey": "#e3e3e3",
67
+ "bg-light": "#f9f9f9",
72
68
  "bg-cream": "#f4f2ed"
73
69
  },
74
70
  "typo": {
71
+ "title-xxl": {
72
+ "fontFamily": "\"suisse-regular\", Arial, Helvetica, sans-serif",
73
+ "fontWeight": "300",
74
+ "mobile": {
75
+ "fontSize": "24px",
76
+ "lineHeight": "1"
77
+ },
78
+ "desktop": {
79
+ "fontSize": "24px",
80
+ "lineHeight": "1"
81
+ }
82
+ },
75
83
  "h2": {
76
- "fontFamily": "arial, sans-serif",
77
- "fontWeight": "900",
84
+ "fontFamily": "\"suisse-semibold\", Arial, Helvetica, sans-serif",
85
+ "fontWeight": "600",
78
86
  "letterSpacing": "0rem",
79
87
  "textTransform": "none",
80
88
  "mobile": {
81
89
  "fontSize": "18px",
82
- "lineHeight": "1.976"
90
+ "lineHeight": "1.2"
83
91
  },
84
92
  "desktop": {
85
93
  "fontSize": "24px",
@@ -87,166 +95,225 @@
87
95
  }
88
96
  },
89
97
  "title-l-b": {
90
- "fontFamily": "arial, sans-serif",
91
- "fontWeight": "700",
92
- "letterSpacing": "0rem",
93
- "textTransform": "uppercase",
98
+ "fontFamily": "\"suisse-regular\", Arial, Helvetica, sans-serif",
99
+ "fontWeight": "300",
94
100
  "mobile": {
95
- "fontSize": "14px",
96
- "lineHeight": "1.2"
101
+ "fontSize": "12px",
102
+ "lineHeight": "1.4"
97
103
  },
98
104
  "desktop": {
99
- "fontSize": "14px",
105
+ "fontSize": "13px",
100
106
  "lineHeight": "1.4"
101
107
  }
102
108
  },
103
109
  "title-l": {
104
- "fontFamily": "arial, sans-serif",
110
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
105
111
  "fontWeight": "100",
112
+ "letterSpacing": "0.16em",
113
+ "textTransform": "uppercase",
106
114
  "mobile": {
107
- "fontSize": "14px",
115
+ "fontSize": "12px",
108
116
  "lineHeight": "1.4"
109
117
  },
110
118
  "desktop": {
111
- "fontSize": "14px",
119
+ "fontSize": "13px",
112
120
  "lineHeight": "1.4"
113
121
  }
114
122
  },
115
123
  "title-m": {
116
- "fontFamily": "arial, sans-serif",
124
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
117
125
  "fontWeight": "100",
126
+ "letterSpacing": "0.16em",
118
127
  "mobile": {
119
128
  "fontSize": "12px",
120
129
  "lineHeight": "1.4"
121
130
  },
122
131
  "desktop": {
123
- "fontSize": "12px",
132
+ "fontSize": "13px",
133
+ "lineHeight": "1.4"
134
+ }
135
+ },
136
+ "title-s-b": {
137
+ "fontFamily": "\"suisse-regular\", Arial, Helvetica, sans-serif",
138
+ "fontWeight": "300",
139
+ "letterSpacing": "0.16em",
140
+ "mobile": {
141
+ "fontSize": "10px",
142
+ "lineHeight": "1.4"
143
+ },
144
+ "desktop": {
145
+ "fontSize": "10px",
124
146
  "lineHeight": "1.4"
125
147
  }
126
148
  },
127
149
  "title-s": {
128
- "fontFamily": "arial, sans-serif",
129
- "fontWeight": "400",
150
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
151
+ "fontWeight": "100",
152
+ "letterSpacing": "0.16em",
153
+ "textTransform": "uppercase",
130
154
  "mobile": {
131
- "fontSize": "12px",
155
+ "fontSize": "10px",
132
156
  "lineHeight": "1.4"
133
157
  },
134
158
  "desktop": {
135
- "fontSize": "12px",
159
+ "fontSize": "10px",
136
160
  "lineHeight": "1.4"
137
161
  }
138
162
  },
139
163
  "text-l": {
140
- "fontFamily": "arial, sans-serif",
164
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
141
165
  "fontWeight": "100",
166
+ "letterSpacing": "0.04em",
142
167
  "mobile": {
143
- "fontSize": "12px",
168
+ "fontSize": "13px",
144
169
  "lineHeight": "1.5"
145
170
  },
146
171
  "desktop": {
147
- "fontSize": "12px",
172
+ "fontSize": "13px",
148
173
  "lineHeight": "1.5"
149
174
  }
150
175
  },
151
176
  "text-m": {
152
- "fontFamily": "arial, sans-serif",
177
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
153
178
  "fontWeight": "100",
179
+ "letterSpacing": "0.04em",
154
180
  "mobile": {
155
181
  "fontSize": "12px",
156
182
  "lineHeight": "1.5"
157
183
  },
158
184
  "desktop": {
159
- "fontSize": "13px",
185
+ "fontSize": "12px",
160
186
  "lineHeight": "1.5"
161
187
  }
162
188
  },
163
- "semantic": {
164
- "fontFamily": "arial, sans-serif",
189
+ "p-tag": {
190
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
165
191
  "fontWeight": "100",
192
+ "letterSpacing": "0.16em",
166
193
  "mobile": {
167
- "fontSize": "13px",
194
+ "fontSize": "9px",
168
195
  "lineHeight": "1"
169
196
  },
170
197
  "desktop": {
171
- "fontSize": "13px",
198
+ "fontSize": "10px",
172
199
  "lineHeight": "1"
173
200
  }
174
201
  },
175
- "p-tag": {
176
- "fontFamily": "arial, sans-serif",
202
+ "hg-body-l": {
203
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
177
204
  "fontWeight": "100",
205
+ "letterSpacing": "0.04em",
178
206
  "mobile": {
179
- "fontSize": "8px",
180
- "lineHeight": "1"
207
+ "fontSize": "12px",
208
+ "lineHeight": "1.5"
181
209
  },
182
210
  "desktop": {
183
- "fontSize": "8px",
184
- "lineHeight": "1"
211
+ "fontSize": "13px",
212
+ "lineHeight": "1.5"
185
213
  }
186
214
  },
187
- "suisse-1": {
188
- "fontFamily": "\"ms-serif\", serif",
215
+ "hg-body-l-b": {
216
+ "fontFamily": "\"suisse-regular\", Arial, Helvetica, sans-serif",
217
+ "fontWeight": "300",
218
+ "letterSpacing": "0.04em",
189
219
  "mobile": {
190
- "fontSize": "16px",
220
+ "fontSize": "12px",
191
221
  "lineHeight": "1.5"
192
222
  },
193
223
  "desktop": {
194
- "fontSize": "20px",
224
+ "fontSize": "13px",
195
225
  "lineHeight": "1.5"
196
226
  }
197
227
  },
198
- "suisse-2": {
199
- "fontFamily": "\"ms-serif\", serif",
228
+ "hg-body-m": {
229
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
230
+ "fontWeight": "100",
231
+ "letterSpacing": "0.04em",
200
232
  "mobile": {
201
- "fontSize": "13px",
202
- "lineHeight": "1.1"
233
+ "fontSize": "12px",
234
+ "lineHeight": "1.5"
203
235
  },
204
236
  "desktop": {
205
- "fontSize": "14px",
206
- "lineHeight": "1.1"
237
+ "fontSize": "12px",
238
+ "lineHeight": "1.5"
207
239
  }
208
240
  },
209
- "suisse-body": {
210
- "fontFamily": "\"ms-serif\", serif",
241
+ "hg-body-m-b": {
242
+ "fontFamily": "\"suisse-regular\", Arial, Helvetica, sans-serif",
243
+ "fontWeight": "300",
244
+ "letterSpacing": "0.04em",
211
245
  "mobile": {
212
- "fontSize": "10px",
213
- "lineHeight": "1.1"
246
+ "fontSize": "12px",
247
+ "lineHeight": "1.5"
214
248
  },
215
249
  "desktop": {
216
250
  "fontSize": "12px",
217
- "lineHeight": "1.1"
251
+ "lineHeight": "1.5"
218
252
  }
219
253
  },
220
- "hg-body-m": {
221
- "fontFamily": "arial, sans-serif",
254
+ "label-m": {
255
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
222
256
  "fontWeight": "100",
257
+ "letterSpacing": "0.16em",
258
+ "textTransform": "uppercase",
223
259
  "mobile": {
224
260
  "fontSize": "12px",
225
- "lineHeight": "1.5"
261
+ "lineHeight": "1"
226
262
  },
227
263
  "desktop": {
228
- "fontSize": "13px",
229
- "lineHeight": "1.5"
264
+ "fontSize": "12px",
265
+ "lineHeight": "1"
230
266
  }
231
267
  },
232
- "hg-body-m-b": {
233
- "fontFamily": "arial, sans-serif",
234
- "fontWeight": "400",
268
+ "label-m-b": {
269
+ "fontFamily": "\"suisse-regular\", Arial, Helvetica, sans-serif",
270
+ "fontWeight": "300",
271
+ "letterSpacing": "0.16em",
272
+ "textTransform": "uppercase",
235
273
  "mobile": {
236
274
  "fontSize": "12px",
237
- "lineHeight": "1.5"
275
+ "lineHeight": "1"
238
276
  },
239
277
  "desktop": {
240
- "fontSize": "13px",
241
- "lineHeight": "1.5"
278
+ "fontSize": "12px",
279
+ "lineHeight": "1"
280
+ }
281
+ },
282
+ "label-s": {
283
+ "fontFamily": "\"suisse-light\", Arial, Helvetica, sans-serif",
284
+ "fontWeight": "100",
285
+ "letterSpacing": "0.06em",
286
+ "textTransform": "uppercase",
287
+ "mobile": {
288
+ "fontSize": "10px",
289
+ "lineHeight": "1"
290
+ },
291
+ "desktop": {
292
+ "fontSize": "10px",
293
+ "lineHeight": "1"
294
+ }
295
+ },
296
+ "label-s-b": {
297
+ "fontFamily": "\"suisse-regular\", Arial, Helvetica, sans-serif",
298
+ "fontWeight": "300",
299
+ "letterSpacing": "0.06em",
300
+ "textTransform": "uppercase",
301
+ "mobile": {
302
+ "fontSize": "10px",
303
+ "lineHeight": "1"
304
+ },
305
+ "desktop": {
306
+ "fontSize": "10px",
307
+ "lineHeight": "1"
242
308
  }
243
309
  }
244
310
  },
245
311
  "variables": {
246
- "--hg-typo-font-family-primary": "arial, sans-serif",
312
+ "--hg-typo-font-family-primary-regular": "\"suisse-regular\", Arial, Helvetica, sans-serif",
247
313
  "--hg-typo-font-family-secondary": "\"ms-serif\", serif",
248
- "--hg-typo-font-family-luxury-serif": "'Playfair Display', 'Georgia', serif",
249
- "--hg-typo-font-family-elegant-sans": "'IBM Plex Sans', 'Helvetica Neue', sans-serif",
314
+ "--hg-typo-font-family-serif": "'Playfair Display', 'Georgia', serif",
315
+ "--hg-typo-font-family-primary-light": "\"suisse-light\", Arial, Helvetica, sans-serif",
316
+ "--hg-typo-font-family-primary-bold": "\"suisse-semibold\", Arial, Helvetica, sans-serif",
250
317
  "--hg-typo-line-height-1": "1",
251
318
  "--hg-typo-line-height-1-976": "1.976",
252
319
  "--hg-typo-line-height-1-2": "1.2",
@@ -256,6 +323,7 @@
256
323
  "--hg-typo-line-height-1-3": "1.3",
257
324
  "--hg-typo-line-height-1-6": "1.6",
258
325
  "--hg-typo-font-weight-100": "100",
326
+ "--hg-typo-font-weight-300": "300",
259
327
  "--hg-typo-font-weight-400": "400",
260
328
  "--hg-typo-font-weight-500": "500",
261
329
  "--hg-typo-font-weight-600": "600",
@@ -267,6 +335,9 @@
267
335
  "--hg-typo-letter-spacing-0-08": "0.08rem",
268
336
  "--hg-typo-letter-spacing-10": "10rem",
269
337
  "--hg-typo-letter-spacing-110": "110rem",
338
+ "--hg-typo-letter-spacing-0-16em": "0.16em",
339
+ "--hg-typo-letter-spacing-0-04em": "0.04em",
340
+ "--hg-typo-letter-spacing-0-06em": "0.06em",
270
341
  "--hg-typo-text-transform-none": "none",
271
342
  "--hg-typo-text-transform-uppercase": "uppercase",
272
343
  "--hg-typo-text-transform-otro": "otro",
@@ -281,6 +352,7 @@
281
352
  "--hg-typo-font-size-8": "0.5rem",
282
353
  "--hg-typo-font-size-32": "2rem",
283
354
  "--hg-typo-font-size-48": "3rem",
355
+ "--hg-typo-font-size-9": "0.5625rem",
284
356
  "--hg-spacing-0": "0",
285
357
  "--hg-spacing-4": "0.25rem",
286
358
  "--hg-spacing-8": "0.5rem",
@@ -324,21 +396,16 @@
324
396
  "--hg-color-orange": "#B75D0B",
325
397
  "--hg-color-mustard": "#FFE693",
326
398
  "--hg-color-primary": "#000000",
327
- "--hg-color-error": "#b40016",
328
- "--hg-color-info": "#1a32a4",
399
+ "--hg-color-error": "#dd2d01",
400
+ "--hg-color-info": "#2037a6",
329
401
  "--hg-color-success": "#12882C",
330
- "--hg-color-warning": "#ffc700",
402
+ "--hg-color-warning": "#ffce4e",
331
403
  "--hg-color-feel": "#fb9962",
332
404
  "--hg-color-feel-dark": "#c94c07",
333
- "--hg-color-special": "#b99d6b",
334
- "--hg-color-vanilla": "#F4F2ED",
335
405
  "--hg-color-silver": "#87888D",
336
406
  "--hg-color-gold": "#A38A6B",
337
407
  "--hg-color-platinum": "#5B7FA1",
338
- "--hg-color-charcoal": "#1D1D1D",
339
- "--hg-color-bg-light": "#F0F0F0",
340
- "--hg-color-c-bg-light": "#000000",
341
- "--hg-color-sk-grey": "#e3e3e3",
408
+ "--hg-color-bg-light": "#f9f9f9",
342
409
  "--hg-color-bg-cream": "#f4f2ed"
343
410
  }
344
411
  }
@@ -25,6 +25,64 @@ const ASSETS_CONFIG = {
25
25
  source: 'src/assets/margen.webp',
26
26
  dest: 'dist/assets/margen.webp'
27
27
  }
28
+ ],
29
+ fonts: [
30
+ {
31
+ source: 'src/assets/fonts/suisse-intl-light.woff2',
32
+ dest: 'dist/assets/fonts/suisse-intl-light.woff2'
33
+ },
34
+ {
35
+ source: 'src/assets/fonts/suisse-intl-light.woff',
36
+ dest: 'dist/assets/fonts/suisse-intl-light.woff'
37
+ },
38
+ {
39
+ source: 'src/assets/fonts/suisse-intl-regular.woff2',
40
+ dest: 'dist/assets/fonts/suisse-intl-regular.woff2'
41
+ },
42
+ {
43
+ source: 'src/assets/fonts/suisse-intl-regular.woff',
44
+ dest: 'dist/assets/fonts/suisse-intl-regular.woff'
45
+ },
46
+ {
47
+ source: 'src/assets/fonts/suisse-intl-medium.woff2',
48
+ dest: 'dist/assets/fonts/suisse-intl-medium.woff2'
49
+ },
50
+ {
51
+ source: 'src/assets/fonts/suisse-intl-medium.woff',
52
+ dest: 'dist/assets/fonts/suisse-intl-medium.woff'
53
+ },
54
+ {
55
+ source: 'src/assets/fonts/suisse-intl-semibold.woff2',
56
+ dest: 'dist/assets/fonts/suisse-intl-semibold.woff2'
57
+ },
58
+ {
59
+ source: 'src/assets/fonts/suisse-intl-semibold.woff',
60
+ dest: 'dist/assets/fonts/suisse-intl-semibold.woff'
61
+ },
62
+ {
63
+ source: 'src/assets/fonts/suisse-works-regular.woff2',
64
+ dest: 'dist/assets/fonts/suisse-works-regular.woff2'
65
+ },
66
+ {
67
+ source: 'src/assets/fonts/suisse-works-regular.woff',
68
+ dest: 'dist/assets/fonts/suisse-works-regular.woff'
69
+ },
70
+ {
71
+ source: 'src/assets/fonts/suisse-works-medium.woff2',
72
+ dest: 'dist/assets/fonts/suisse-works-medium.woff2'
73
+ },
74
+ {
75
+ source: 'src/assets/fonts/suisse-works-medium.woff',
76
+ dest: 'dist/assets/fonts/suisse-works-medium.woff'
77
+ },
78
+ {
79
+ source: 'src/assets/fonts/suisse-works-bold.woff2',
80
+ dest: 'dist/assets/fonts/suisse-works-bold.woff2'
81
+ },
82
+ {
83
+ source: 'src/assets/fonts/suisse-works-bold.woff',
84
+ dest: 'dist/assets/fonts/suisse-works-bold.woff'
85
+ }
28
86
  ]
29
87
  };
30
88
 
@@ -107,15 +165,32 @@ class AssetManager {
107
165
  }
108
166
 
109
167
  /**
110
- * Copia todos los assets (CSS e imágenes)
111
- * @param {string|Array} types - 'all', 'css', 'images', o array de tipos
168
+ * Copia todas las fuentes configuradas
169
+ * @param {boolean} silent - Si true, no muestra mensajes
170
+ * @returns {number} - Número de archivos copiados exitosamente
171
+ */
172
+ copyFonts(silent = false) {
173
+ let count = 0;
174
+ const fonts = this.assetsConfig.fonts || [];
175
+ fonts.forEach(({ source, dest }) => {
176
+ if (this.copyFile(source, dest, silent)) {
177
+ count++;
178
+ }
179
+ });
180
+ return count;
181
+ }
182
+
183
+ /**
184
+ * Copia todos los assets (CSS, imágenes y fuentes)
185
+ * @param {string|Array} types - 'all', 'css', 'images', 'fonts', o array de tipos
112
186
  * @param {boolean} silent - Si true, no muestra mensajes
113
187
  * @returns {Object} - Objeto con conteo de archivos copiados por tipo
114
188
  */
115
189
  copyAssets(types = 'all', silent = false) {
116
190
  const result = {
117
191
  css: 0,
118
- images: 0
192
+ images: 0,
193
+ fonts: 0
119
194
  };
120
195
 
121
196
  if (types === 'all' || (Array.isArray(types) && types.includes('css')) || types === 'css') {
@@ -126,6 +201,10 @@ class AssetManager {
126
201
  result.images = this.copyImages(silent);
127
202
  }
128
203
 
204
+ if (types === 'all' || (Array.isArray(types) && types.includes('fonts')) || types === 'fonts') {
205
+ result.fonts = this.copyFonts(silent);
206
+ }
207
+
129
208
  return result;
130
209
  }
131
210
 
@@ -146,6 +225,18 @@ class AssetManager {
146
225
  addImageAsset(source, dest) {
147
226
  this.assetsConfig.images.push({ source, dest });
148
227
  }
228
+
229
+ /**
230
+ * Agrega una fuente a la configuración
231
+ * @param {string} source - Ruta relativa al proyecto
232
+ * @param {string} dest - Ruta relativa al proyecto
233
+ */
234
+ addFontAsset(source, dest) {
235
+ if (!this.assetsConfig.fonts) {
236
+ this.assetsConfig.fonts = [];
237
+ }
238
+ this.assetsConfig.fonts.push({ source, dest });
239
+ }
149
240
  }
150
241
 
151
242
  module.exports = { AssetManager, ASSETS_CONFIG };