svger-cli 2.0.6 → 2.0.7
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/.svgerconfig.example.json +119 -119
- package/CHANGELOG.md +144 -156
- package/DEVELOPMENT.md +352 -352
- package/LICENSE +20 -20
- package/README.md +2340 -2654
- package/SECURITY.md +68 -68
- package/bin/svg-tool.js +2 -2
- package/dist/core/framework-templates.d.ts +1 -0
- package/dist/core/framework-templates.js +373 -285
- package/dist/core/style-compiler.js +201 -201
- package/dist/core/template-manager.js +348 -348
- package/dist/services/svg-service.js +12 -12
- package/dist/templates/ComponentTemplate.js +17 -17
- package/dist/types/index.d.ts +1 -1
- package/docs/ADR-SVG-INTRGRATION-METHODS-001.adr.md +157 -157
- package/docs/ADR-SVG-INTRGRATION-METHODS-002.adr.md +549 -549
- package/docs/FRAMEWORK-GUIDE.md +768 -768
- package/docs/IMPLEMENTATION-SUMMARY.md +376 -376
- package/package.json +179 -177
package/README.md
CHANGED
|
@@ -1,2654 +1,2340 @@
|
|
|
1
|
-
# SVGER-CLI v2.0.
|
|
2
|
-
|
|
3
|
-
[](https://badge.fury.io/js/svger-cli)
|
|
4
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://www.typescriptlang.org/)
|
|
6
|
-
[](https://www.npmjs.com/package/svger-cli)
|
|
7
|
-
|
|
8
|
-
> **The most advanced, zero-dependency SVG to component converter, now with first-class support for
|
|
9
|
-
>
|
|
10
|
-
> workflow for your entire design system.**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
**
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
```
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
3
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
```
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
svger-cli
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
```
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
svger-cli
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
```
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
# Generate with
|
|
1211
|
-
svger-cli
|
|
1212
|
-
--
|
|
1213
|
-
--
|
|
1214
|
-
--
|
|
1215
|
-
--
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
--
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
```
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
#
|
|
1544
|
-
svger-cli build
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
#
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
#
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
```
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
```
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
**
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
```
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
});
|
|
2342
|
-
});
|
|
2343
|
-
```
|
|
2344
|
-
|
|
2345
|
-
### **Integration Testing**
|
|
2346
|
-
|
|
2347
|
-
```bash
|
|
2348
|
-
# Run integration tests
|
|
2349
|
-
npm run test:integration
|
|
2350
|
-
|
|
2351
|
-
# Test specific framework
|
|
2352
|
-
npm run test:framework:react
|
|
2353
|
-
npm run test:framework:vue
|
|
2354
|
-
npm run test:framework:angular
|
|
2355
|
-
```
|
|
2356
|
-
|
|
2357
|
-
### **Performance Testing**
|
|
2358
|
-
|
|
2359
|
-
```bash
|
|
2360
|
-
# Run performance benchmarks
|
|
2361
|
-
svger-cli performance --benchmark
|
|
2362
|
-
|
|
2363
|
-
# Memory leak testing
|
|
2364
|
-
svger-cli performance --memory --duration 60s
|
|
2365
|
-
|
|
2366
|
-
# Load testing
|
|
2367
|
-
svger-cli performance --load --files 1000
|
|
2368
|
-
```
|
|
2369
|
-
|
|
2370
|
-
---
|
|
2371
|
-
|
|
2372
|
-
## 🚀 **Production Deployment**
|
|
2373
|
-
|
|
2374
|
-
### **CI/CD Integration**
|
|
2375
|
-
|
|
2376
|
-
#### **GitHub Actions**
|
|
2377
|
-
|
|
2378
|
-
```yaml
|
|
2379
|
-
name: SVG Component Generation
|
|
2380
|
-
on:
|
|
2381
|
-
push:
|
|
2382
|
-
paths: ['src/assets/svg/**']
|
|
2383
|
-
|
|
2384
|
-
jobs:
|
|
2385
|
-
generate-components:
|
|
2386
|
-
runs-on: ubuntu-latest
|
|
2387
|
-
steps:
|
|
2388
|
-
- uses: actions/checkout@v3
|
|
2389
|
-
- uses: actions/setup-node@v3
|
|
2390
|
-
with:
|
|
2391
|
-
node-version: '18'
|
|
2392
|
-
|
|
2393
|
-
- name: Install SVGER-CLI
|
|
2394
|
-
run: npm install -g svger-cli@2.0.5
|
|
2395
|
-
|
|
2396
|
-
- name: Generate Components
|
|
2397
|
-
run: |
|
|
2398
|
-
svger-cli build \
|
|
2399
|
-
--src ./src/assets/svg \
|
|
2400
|
-
--out ./src/components/icons \
|
|
2401
|
-
--framework react \
|
|
2402
|
-
--typescript \
|
|
2403
|
-
--parallel \
|
|
2404
|
-
--performance
|
|
2405
|
-
|
|
2406
|
-
- name: Commit Generated Components
|
|
2407
|
-
run: |
|
|
2408
|
-
git config --local user.email "action@github.com"
|
|
2409
|
-
git config --local user.name "GitHub Action"
|
|
2410
|
-
git add src/components/icons/
|
|
2411
|
-
git commit -m "🤖 Auto-generated SVG components" || exit 0
|
|
2412
|
-
git push
|
|
2413
|
-
```
|
|
2414
|
-
|
|
2415
|
-
#### **Jenkins Pipeline**
|
|
2416
|
-
|
|
2417
|
-
```groovy
|
|
2418
|
-
pipeline {
|
|
2419
|
-
agent any
|
|
2420
|
-
|
|
2421
|
-
stages {
|
|
2422
|
-
stage('Generate SVG Components') {
|
|
2423
|
-
steps {
|
|
2424
|
-
sh '''
|
|
2425
|
-
npm install -g svger-cli@2.0.5
|
|
2426
|
-
svger-cli build \
|
|
2427
|
-
--src ./assets/svg \
|
|
2428
|
-
--out ./components \
|
|
2429
|
-
--framework vue \
|
|
2430
|
-
--composition \
|
|
2431
|
-
--typescript \
|
|
2432
|
-
--cache \
|
|
2433
|
-
--performance
|
|
2434
|
-
'''
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
}
|
|
2438
|
-
}
|
|
2439
|
-
```
|
|
2440
|
-
|
|
2441
|
-
### **Docker Integration**
|
|
2442
|
-
|
|
2443
|
-
```dockerfile
|
|
2444
|
-
FROM node:18-alpine
|
|
2445
|
-
|
|
2446
|
-
# Install SVGER-CLI globally
|
|
2447
|
-
RUN npm install -g svger-cli@2.0.5
|
|
2448
|
-
|
|
2449
|
-
# Set working directory
|
|
2450
|
-
WORKDIR /app
|
|
2451
|
-
|
|
2452
|
-
# Copy SVG files
|
|
2453
|
-
COPY src/assets/svg ./src/assets/svg
|
|
2454
|
-
|
|
2455
|
-
# Generate components
|
|
2456
|
-
RUN svger-cli build \
|
|
2457
|
-
--src ./src/assets/svg \
|
|
2458
|
-
--out ./src/components/icons \
|
|
2459
|
-
--framework react \
|
|
2460
|
-
--typescript \
|
|
2461
|
-
--parallel
|
|
2462
|
-
|
|
2463
|
-
# Copy generated components
|
|
2464
|
-
COPY src/components ./src/components
|
|
2465
|
-
```
|
|
2466
|
-
|
|
2467
|
-
---
|
|
2468
|
-
|
|
2469
|
-
## 🔌 **Plugin Development**
|
|
2470
|
-
|
|
2471
|
-
### **Creating Custom Plugins**
|
|
2472
|
-
|
|
2473
|
-
```typescript
|
|
2474
|
-
import { Plugin } from 'svger-cli';
|
|
2475
|
-
|
|
2476
|
-
const customOptimizer: Plugin = {
|
|
2477
|
-
name: 'custom-svg-optimizer',
|
|
2478
|
-
version: '1.0.0',
|
|
2479
|
-
|
|
2480
|
-
process: async (content: string, options?: any) => {
|
|
2481
|
-
// Custom SVG processing logic
|
|
2482
|
-
const optimized = content
|
|
2483
|
-
.replace(/fill="none"/g, '')
|
|
2484
|
-
.replace(/stroke="currentColor"/g, 'stroke="inherit"');
|
|
2485
|
-
|
|
2486
|
-
return optimized;
|
|
2487
|
-
},
|
|
2488
|
-
|
|
2489
|
-
validate: (options?: any) => {
|
|
2490
|
-
return options && typeof options.level === 'string';
|
|
2491
|
-
},
|
|
2492
|
-
};
|
|
2493
|
-
|
|
2494
|
-
// Register plugin
|
|
2495
|
-
import { pluginManager } from 'svger-cli';
|
|
2496
|
-
pluginManager.registerPlugin(customOptimizer);
|
|
2497
|
-
```
|
|
2498
|
-
|
|
2499
|
-
### **Plugin Configuration**
|
|
2500
|
-
|
|
2501
|
-
```json
|
|
2502
|
-
{
|
|
2503
|
-
"plugins": [
|
|
2504
|
-
{
|
|
2505
|
-
"name": "svg-optimizer",
|
|
2506
|
-
"options": {
|
|
2507
|
-
"level": "balanced"
|
|
2508
|
-
}
|
|
2509
|
-
},
|
|
2510
|
-
{
|
|
2511
|
-
"name": "custom-svg-optimizer",
|
|
2512
|
-
"options": {
|
|
2513
|
-
"level": "maximum"
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
]
|
|
2517
|
-
}
|
|
2518
|
-
```
|
|
2519
|
-
|
|
2520
|
-
---
|
|
2521
|
-
|
|
2522
|
-
## 🔍 **Troubleshooting & FAQ**
|
|
2523
|
-
|
|
2524
|
-
### **Common Issues**
|
|
2525
|
-
|
|
2526
|
-
#### **Memory Issues**
|
|
2527
|
-
|
|
2528
|
-
```bash
|
|
2529
|
-
# If experiencing memory issues with large batches
|
|
2530
|
-
svger-cli build \
|
|
2531
|
-
--batch-size 5 \
|
|
2532
|
-
--max-concurrency 2 \
|
|
2533
|
-
--src ./icons \
|
|
2534
|
-
--out ./components
|
|
2535
|
-
```
|
|
2536
|
-
|
|
2537
|
-
#### **Performance Issues**
|
|
2538
|
-
|
|
2539
|
-
```bash
|
|
2540
|
-
# Enable performance monitoring
|
|
2541
|
-
svger-cli performance --analyze
|
|
2542
|
-
|
|
2543
|
-
# Clear cache if needed
|
|
2544
|
-
svger-cli clean --cache
|
|
2545
|
-
|
|
2546
|
-
# Optimize configuration
|
|
2547
|
-
svger-cli performance --optimize
|
|
2548
|
-
```
|
|
2549
|
-
|
|
2550
|
-
#### **TypeScript Errors**
|
|
2551
|
-
|
|
2552
|
-
```bash
|
|
2553
|
-
# Validate configuration
|
|
2554
|
-
svger-cli config --validate
|
|
2555
|
-
|
|
2556
|
-
# Regenerate with strict TypeScript
|
|
2557
|
-
svger-cli build --typescript --strict
|
|
2558
|
-
```
|
|
2559
|
-
|
|
2560
|
-
### **Debugging**
|
|
2561
|
-
|
|
2562
|
-
```bash
|
|
2563
|
-
# Enable verbose logging
|
|
2564
|
-
svger-cli build --verbose --src ./icons --out ./components
|
|
2565
|
-
|
|
2566
|
-
# Debug specific framework
|
|
2567
|
-
svger-cli build --framework vue --debug
|
|
2568
|
-
|
|
2569
|
-
# Performance debugging
|
|
2570
|
-
svger-cli build --performance --memory
|
|
2571
|
-
```
|
|
2572
|
-
|
|
2573
|
-
---
|
|
2574
|
-
|
|
2575
|
-
## 📚 **Migration Guide**
|
|
2576
|
-
|
|
2577
|
-
### **From SVGR**
|
|
2578
|
-
|
|
2579
|
-
```bash
|
|
2580
|
-
# Install SVGER-CLI
|
|
2581
|
-
npm uninstall @svgr/webpack @svgr/cli
|
|
2582
|
-
npm install -g svger-cli@2.0.5
|
|
2583
|
-
|
|
2584
|
-
# Migrate configuration
|
|
2585
|
-
svger-cli init --framework react --typescript
|
|
2586
|
-
|
|
2587
|
-
# Build components
|
|
2588
|
-
svger-cli build --src ./assets --out ./components
|
|
2589
|
-
```
|
|
2590
|
-
|
|
2591
|
-
### **From v1.x**
|
|
2592
|
-
|
|
2593
|
-
```bash
|
|
2594
|
-
# Upgrade to v2.0
|
|
2595
|
-
npm install -g svger-cli@2.0.5
|
|
2596
|
-
|
|
2597
|
-
# Migrate configuration
|
|
2598
|
-
svger-cli config --migrate
|
|
2599
|
-
|
|
2600
|
-
# Rebuild with new features
|
|
2601
|
-
svger-cli build --framework react --responsive --theme dark
|
|
2602
|
-
```
|
|
2603
|
-
|
|
2604
|
-
---
|
|
2605
|
-
|
|
2606
|
-
## 🤝 **Contributing & Support**
|
|
2607
|
-
|
|
2608
|
-
### **Contributing**
|
|
2609
|
-
|
|
2610
|
-
1. Fork the repository
|
|
2611
|
-
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
2612
|
-
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
2613
|
-
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
2614
|
-
5. Open a Pull Request
|
|
2615
|
-
|
|
2616
|
-
### **Support**
|
|
2617
|
-
|
|
2618
|
-
- 📧 **Email**: navidrezadoost07@gmail.com
|
|
2619
|
-
- 🐛 **Issues**: [GitHub Issues](https://github.com/faezemohades/svger-cli/issues)
|
|
2620
|
-
- 📖 **Documentation**: [docs.svger-cli.com](https://docs.svger-cli.com)
|
|
2621
|
-
|
|
2622
|
-
---
|
|
2623
|
-
|
|
2624
|
-
## 📄 **License & Acknowledgements**
|
|
2625
|
-
|
|
2626
|
-
### **License**
|
|
2627
|
-
|
|
2628
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
2629
|
-
|
|
2630
|
-
### **Acknowledgements**
|
|
2631
|
-
|
|
2632
|
-
This project was developed through the collaborative efforts of:
|
|
2633
|
-
|
|
2634
|
-
- **🏗️ Architecture Design**: [ADR-001](./docs/ADR-SVG-INTRGRATION-METHODS-001.adr.md) authored by
|
|
2635
|
-
**Engineer Navid Rezadoost**
|
|
2636
|
-
- **📋 Technical Requirements**:
|
|
2637
|
-
[TDR-001](https://docs.google.com/document/d/1b04_V01xOvLiSMzuPdaRynANlnt2wYdJ_vjs9MAqtn4/edit?tab=t.0)
|
|
2638
|
-
prepared by **Ehsan Jafari**
|
|
2639
|
-
- **💻 Implementation**: **Navid Rezadoost** - Faeze Mohades Lead developer and package maintainer
|
|
2640
|
-
- **🏢 Enterprise Architecture**: SVGER Development Team
|
|
2641
|
-
|
|
2642
|
-
Their guidance and documentation on SVG integration methods in React, Vue, and other frameworks were
|
|
2643
|
-
instrumental in shaping the design and functionality of the SVGER-CLI v2.0.
|
|
2644
|
-
|
|
2645
|
-
### **Special Thanks**
|
|
2646
|
-
|
|
2647
|
-
- The open-source community for inspiration and feedback
|
|
2648
|
-
- Framework maintainers for excellent documentation
|
|
2649
|
-
- Beta testers who provided valuable insights
|
|
2650
|
-
- Enterprise customers who drove advanced feature requirements
|
|
2651
|
-
|
|
2652
|
-
---
|
|
2653
|
-
|
|
2654
|
-
**© 2025 SVGER-CLI Development Team. Built with ❤️ for the developer community.**
|
|
1
|
+
# SVGER-CLI v2.0.7 - Enterprise SVG Processing Framework
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/svger-cli)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://www.npmjs.com/package/svger-cli)
|
|
7
|
+
|
|
8
|
+
> **The most advanced, zero-dependency SVG to component converter, now with first-class support for
|
|
9
|
+
> 9+ UI frameworks including React Native. Enjoy enterprise-grade performance, auto-generated
|
|
10
|
+
> exports, and a unified workflow for your entire design system.**
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 📖 **Table of Contents**
|
|
15
|
+
|
|
16
|
+
### 🚀 **Getting Started**
|
|
17
|
+
|
|
18
|
+
- [📦 Installation](#-installation)
|
|
19
|
+
- [🚀 Quick Start: Your First Conversion](#-quick-start-your-first-conversion)
|
|
20
|
+
- [💡 Why SVGER-CLI?](#-why-svger-cli-the-zero-dependency-advantage)
|
|
21
|
+
|
|
22
|
+
### 📚 **Core Documentation**
|
|
23
|
+
|
|
24
|
+
- [📊 Feature Comparison Matrix](#-feature-comparison-matrix)
|
|
25
|
+
- [🌐 Multi-Framework Usage Guide](#-multi-framework-usage-guide)
|
|
26
|
+
- [React](#react)
|
|
27
|
+
- [React Native](#react-native)
|
|
28
|
+
- [Vue 3](#vue-3)
|
|
29
|
+
- [Angular](#angular)
|
|
30
|
+
- [Svelte](#svelte)
|
|
31
|
+
- [Solid](#solid)
|
|
32
|
+
- [Lit](#lit)
|
|
33
|
+
- [Preact](#preact)
|
|
34
|
+
- [Vanilla JS/TS](#vanilla-jsts)
|
|
35
|
+
- [🔧 Comprehensive CLI Reference](#-comprehensive-cli-reference)
|
|
36
|
+
|
|
37
|
+
### 🎨 **Advanced Features**
|
|
38
|
+
|
|
39
|
+
- [💻 Usage Examples: From Simple to Complex](#-usage-examples-from-simple-to-complex)
|
|
40
|
+
- [🎨 Advanced Styling & Theming](#-advanced-styling--theming)
|
|
41
|
+
- [Responsive Design System](#responsive-design-system)
|
|
42
|
+
- [Theme System](#theme-system)
|
|
43
|
+
- [Animation System](#animation-system)
|
|
44
|
+
- [💻 Programmatic API](#-programmatic-api)
|
|
45
|
+
- [🔧 Configuration Reference](#-configuration-reference)
|
|
46
|
+
|
|
47
|
+
### ⚡ **Performance & Deployment**
|
|
48
|
+
|
|
49
|
+
- [⚡ Performance Optimization](#-performance-optimization)
|
|
50
|
+
- [Benchmarks vs Competitors](#benchmarks-vs-competitors)
|
|
51
|
+
- [Performance Best Practices](#performance-best-practices)
|
|
52
|
+
- [🚀 Production Deployment](#-production-deployment)
|
|
53
|
+
- [CI/CD Integration](#cicd-integration)
|
|
54
|
+
- [Docker Integration](#docker-integration)
|
|
55
|
+
|
|
56
|
+
### 🧪 **Testing & Quality**
|
|
57
|
+
|
|
58
|
+
- [🧪 Testing & Quality Assurance](#-testing--quality-assurance)
|
|
59
|
+
- [🔌 Plugin Development](#-plugin-development)
|
|
60
|
+
|
|
61
|
+
### 🆘 **Support & Resources**
|
|
62
|
+
|
|
63
|
+
- [🔍 Troubleshooting & FAQ](#-troubleshooting--faq)
|
|
64
|
+
- [📚 Migration Guide](#-migration-guide)
|
|
65
|
+
- [🤝 Contributing & Support](#-contributing--support)
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## ⚡ **Quick Jump Navigation**
|
|
70
|
+
|
|
71
|
+
**Looking for something specific?**
|
|
72
|
+
|
|
73
|
+
| **I want to...** | **Go to section** |
|
|
74
|
+
| ------------------------------------- | --------------------------------------------------------------- |
|
|
75
|
+
| 🎯 Get started immediately | [Quick Start](#-quick-start-your-first-conversion) |
|
|
76
|
+
| 📦 Install the package | [Installation](#-installation) |
|
|
77
|
+
| 🤔 Understand why SVGER-CLI is better | [Why SVGER-CLI?](#-why-svger-cli-the-zero-dependency-advantage) |
|
|
78
|
+
| ⚡ Compare features with competitors | [Feature Comparison](#-feature-comparison-matrix) |
|
|
79
|
+
| 🚀 Convert SVGs to React components | [React Guide](#react) |
|
|
80
|
+
| � Use with React Native | [React Native Guide](#react-native) |
|
|
81
|
+
| �💚 Use with Vue | [Vue Guide](#vue-3) |
|
|
82
|
+
| 🅰️ Use with Angular | [Angular Guide](#angular) |
|
|
83
|
+
| 🌪️ Use with Svelte | [Svelte Guide](#svelte) |
|
|
84
|
+
| 📖 Learn all CLI commands | [CLI Reference](#-comprehensive-cli-reference) |
|
|
85
|
+
| 💻 Use the programmatic API | [API Reference](#-programmatic-api) |
|
|
86
|
+
| 🎨 Configure styling & theming | [Styling Guide](#-advanced-styling--theming) |
|
|
87
|
+
| ⚡ Optimize performance | [Performance Guide](#-performance-optimization) |
|
|
88
|
+
| 🚀 Deploy to production | [Deployment Guide](#-production-deployment) |
|
|
89
|
+
| 🐳 Use with Docker | [Docker Setup](#docker-integration) |
|
|
90
|
+
| 🧪 Test my components | [Testing Guide](#-testing--quality-assurance) |
|
|
91
|
+
| 🔧 Configure everything | [Configuration Reference](#-configuration-reference) |
|
|
92
|
+
| 🔌 Create custom plugins | [Plugin Development](#-plugin-development) |
|
|
93
|
+
| 🐛 Fix issues | [Troubleshooting](#-troubleshooting--faq) |
|
|
94
|
+
| 📚 Migrate from another tool | [Migration Guide](#-migration-guide) |
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 🌟 **Key Features Overview**
|
|
101
|
+
|
|
102
|
+
### **✨ Auto-Generated index.ts Exports (Enhanced)**
|
|
103
|
+
|
|
104
|
+
Automatically generates clean index.ts files with **unified export pattern** for maximum
|
|
105
|
+
flexibility:
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// Auto-generated in your output directory
|
|
109
|
+
// Named exports for tree-shaking
|
|
110
|
+
export { default as ArrowLeft } from './ArrowLeft';
|
|
111
|
+
export { default as ArrowRight } from './ArrowRight';
|
|
112
|
+
|
|
113
|
+
// Grouped named exports
|
|
114
|
+
export { ArrowLeft, ArrowRight };
|
|
115
|
+
|
|
116
|
+
// Default export for convenience
|
|
117
|
+
export default { ArrowLeft, ArrowRight };
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Import flexibility:**
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
// Named imports (tree-shaking friendly)
|
|
124
|
+
import { ArrowLeft, ArrowRight } from './components';
|
|
125
|
+
|
|
126
|
+
// Namespace import
|
|
127
|
+
import * as Icons from './components';
|
|
128
|
+
|
|
129
|
+
// Default import
|
|
130
|
+
import Icons from './components';
|
|
131
|
+
const { ArrowLeft } = Icons;
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### **🎯 Enhanced Props & Styling**
|
|
135
|
+
|
|
136
|
+
Components now support comprehensive prop interfaces with React.forwardRef:
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
<Icon className="custom-class" style={{ color: 'red' }} size={32} />
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### **🔒 Comprehensive File Protection**
|
|
143
|
+
|
|
144
|
+
Lock files to prevent accidental modifications during builds:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
svger-cli lock ./icons/critical-logo.svg # Protects during all operations
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 📊 **Feature Comparison Matrix**
|
|
153
|
+
|
|
154
|
+
| **Feature** | **SVGER-CLI v2.0.7** | **SVGR (React)** | **vite-svg-loader (Vue)** | **svelte-svg (Svelte)** | **SVGO** |
|
|
155
|
+
| -------------------------- | -------------------------- | ---------------- | ------------------------- | ----------------------- | ------------------- |
|
|
156
|
+
| **Dependencies** | ✅ **Zero** | ❌ 15+ deps | ❌ 9+ deps | ❌ 7+ deps | ❌ 8+ deps |
|
|
157
|
+
| **Auto-Generated Exports** | ✅ **Full Support** | ❌ Manual | ❌ Manual | ❌ Manual | ❌ N/A |
|
|
158
|
+
| **Framework Support** | ✅ **9+ Frameworks** | ❌ React only | ❌ Vue only | ❌ Svelte only | ❌ N/A |
|
|
159
|
+
| **React Native Support** | ✅ **Full Native** | ❌ None | ❌ None | ❌ None | ❌ N/A |
|
|
160
|
+
| **Advanced Props** | ✅ **Full Support** | ❌ Basic | ❌ Basic | ❌ Basic | ❌ N/A |
|
|
161
|
+
| **File Protection** | ✅ **Lock System** | ❌ None | ❌ None | ❌ None | ❌ None |
|
|
162
|
+
| **Performance** | ✅ **Up to 85% Faster** | Standard | Slow | Standard | Fast (Optimization) |
|
|
163
|
+
| **Bundle Size** | ✅ **~2MB** | ~18.7MB | ~14.2MB | ~11.8MB | ~12.3MB |
|
|
164
|
+
| **Enterprise Features** | ✅ **Full Suite** | ❌ Limited | ❌ None | ❌ None | ❌ None |
|
|
165
|
+
| **TypeScript** | ✅ **Native** | Plugin | Limited | Limited | None |
|
|
166
|
+
| **Batch Processing** | ✅ **Optimized** | Basic | None | None | None |
|
|
167
|
+
| **Plugin System** | ✅ **Extensible** | Limited | None | None | None |
|
|
168
|
+
| **Configuration Schema** | ✅ **28 Options** | ❌ 8 Options | ❌ 4 Options | ❌ 3 Options | ❌ N/A |
|
|
169
|
+
| **Responsive Design** | ✅ **Built-in** | ❌ Manual | ❌ None | ❌ None | ❌ None |
|
|
170
|
+
| **Theme System** | ✅ **Auto Dark/Light** | ❌ Manual | ❌ None | ❌ None | ❌ None |
|
|
171
|
+
| **Error Handling** | ✅ **Advanced Strategies** | ❌ Basic | ❌ Basic | ❌ Basic | ❌ Basic |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## � **Why SVGER-CLI? The Zero-Dependency Advantage**
|
|
176
|
+
|
|
177
|
+
In a landscape cluttered with heavy, single-framework tools, **SVGER-CLI** stands alone. It's
|
|
178
|
+
engineered from the ground up with a single philosophy: **native, zero-dependency performance**.
|
|
179
|
+
|
|
180
|
+
- **No `node_modules` bloat**: Drastically smaller footprint.
|
|
181
|
+
- **Faster installs**: Perfect for CI/CD and rapid development.
|
|
182
|
+
- **Unmatched security**: No third-party vulnerabilities.
|
|
183
|
+
- **Cross-framework consistency**: The same powerful engine for every framework.
|
|
184
|
+
|
|
185
|
+
This lean approach delivers up to **85% faster processing** and a **90% smaller bundle size**
|
|
186
|
+
compared to alternatives that rely on dozens of transitive dependencies.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 📦 **Installation**
|
|
191
|
+
|
|
192
|
+
Install globally for access to the `svger-cli` command anywhere.
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
npm install -g svger-cli
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Or add it to your project's dev dependencies:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
npm install --save-dev svger-cli
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## 🚀 **Quick Start: Your First Conversion**
|
|
207
|
+
|
|
208
|
+
1. **Place your SVGs** in a directory (e.g., `./my-svgs`).
|
|
209
|
+
2. **Run the build command**:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Convert all SVGs to React components (default)
|
|
213
|
+
svger-cli build ./my-svgs ./components
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
3. **Use your components**: An `index.ts` is auto-generated for easy imports.
|
|
217
|
+
|
|
218
|
+
```tsx
|
|
219
|
+
// Your app's component
|
|
220
|
+
import { MyIcon, AnotherIcon } from './components';
|
|
221
|
+
|
|
222
|
+
function App() {
|
|
223
|
+
return (
|
|
224
|
+
<div>
|
|
225
|
+
<MyIcon className="text-blue-500" />
|
|
226
|
+
<AnotherIcon size={32} style={{ color: 'red' }} />
|
|
227
|
+
</div>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 🌐 **Multi-Framework Usage Guide**
|
|
235
|
+
|
|
236
|
+
SVGER-CLI brings a unified, powerful experience to every major framework. Select your target with
|
|
237
|
+
the `--framework` flag.
|
|
238
|
+
|
|
239
|
+
### **React**
|
|
240
|
+
|
|
241
|
+
Generate optimized React components with `forwardRef`, `memo`, and TypeScript interfaces.
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
svger-cli build ./my-svgs ./react-components --framework react
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Generated React Component (`.tsx`):**
|
|
248
|
+
|
|
249
|
+
```tsx
|
|
250
|
+
import * as React from 'react';
|
|
251
|
+
|
|
252
|
+
interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
253
|
+
size?: number;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const MyIcon: React.FC<IconProps> = React.memo(
|
|
257
|
+
React.forwardRef<SVGSVGElement, IconProps>(({ size = 24, ...props }, ref) => (
|
|
258
|
+
<svg ref={ref} width={size} height={size} viewBox="0 0 24 24" {...props}>
|
|
259
|
+
{/* SVG content */}
|
|
260
|
+
</svg>
|
|
261
|
+
))
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
MyIcon.displayName = 'MyIcon';
|
|
265
|
+
export default MyIcon;
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### **React Native**
|
|
269
|
+
|
|
270
|
+
Generate optimized React Native components with `react-native-svg` integration.
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
svger-cli build ./my-svgs ./react-native-components --framework react-native
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Generated React Native Component (`.tsx`):**
|
|
277
|
+
|
|
278
|
+
```tsx
|
|
279
|
+
import React from 'react';
|
|
280
|
+
import Svg, {
|
|
281
|
+
Path,
|
|
282
|
+
Circle,
|
|
283
|
+
Rect,
|
|
284
|
+
Line,
|
|
285
|
+
Polygon,
|
|
286
|
+
Polyline,
|
|
287
|
+
Ellipse,
|
|
288
|
+
G,
|
|
289
|
+
Defs,
|
|
290
|
+
ClipPath,
|
|
291
|
+
LinearGradient,
|
|
292
|
+
RadialGradient,
|
|
293
|
+
Stop,
|
|
294
|
+
} from 'react-native-svg';
|
|
295
|
+
import type { SvgProps } from 'react-native-svg';
|
|
296
|
+
|
|
297
|
+
export interface MyIconProps extends SvgProps {
|
|
298
|
+
size?: number | string;
|
|
299
|
+
color?: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const MyIcon = React.forwardRef<Svg, MyIconProps>(({ size, color, ...props }, ref) => {
|
|
303
|
+
const dimensions = size
|
|
304
|
+
? { width: size, height: size }
|
|
305
|
+
: {
|
|
306
|
+
width: props.width || 24,
|
|
307
|
+
height: props.height || 24,
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
return (
|
|
311
|
+
<Svg
|
|
312
|
+
ref={ref}
|
|
313
|
+
viewBox="0 0 24 24"
|
|
314
|
+
width={dimensions.width}
|
|
315
|
+
height={dimensions.height}
|
|
316
|
+
fill={color || props.fill || 'currentColor'}
|
|
317
|
+
{...props}
|
|
318
|
+
>
|
|
319
|
+
{/* SVG content automatically converted to React Native SVG components */}
|
|
320
|
+
<Path d="..." />
|
|
321
|
+
</Svg>
|
|
322
|
+
);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
MyIcon.displayName = 'MyIcon';
|
|
326
|
+
export default MyIcon;
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
**Key Features:**
|
|
330
|
+
|
|
331
|
+
- ✅ Automatic conversion of SVG elements to React Native SVG components
|
|
332
|
+
- ✅ Proper prop conversion (strokeWidth, strokeLinecap, fillRule, etc.)
|
|
333
|
+
- ✅ TypeScript support with SvgProps interface
|
|
334
|
+
- ✅ Size and color prop support
|
|
335
|
+
- ✅ ForwardRef implementation for advanced usage
|
|
336
|
+
- ✅ Compatible with `react-native-svg` package
|
|
337
|
+
|
|
338
|
+
**Installation Requirements:**
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
npm install react-native-svg
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### **Vue 3**
|
|
345
|
+
|
|
346
|
+
Choose between **Composition API** (`--composition`) or **Options API**.
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
# Composition API with <script setup>
|
|
350
|
+
svger-cli build ./my-svgs ./vue-components --framework vue --composition
|
|
351
|
+
|
|
352
|
+
# Options API
|
|
353
|
+
svger-cli build ./my-svgs ./vue-components --framework vue
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Generated Vue Component (`.vue`):**
|
|
357
|
+
|
|
358
|
+
```vue
|
|
359
|
+
<script setup lang="ts">
|
|
360
|
+
import { computed } from 'vue';
|
|
361
|
+
|
|
362
|
+
interface Props {
|
|
363
|
+
size?: number | string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
367
|
+
size: 24,
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
const sizeValue = computed(() => `${props.size}px`);
|
|
371
|
+
</script>
|
|
372
|
+
|
|
373
|
+
<template>
|
|
374
|
+
<svg :width="sizeValue" :height="sizeValue" viewBox="0 0 24 24" v-bind="$attrs">
|
|
375
|
+
{/* SVG content */}
|
|
376
|
+
</svg>
|
|
377
|
+
</template>
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### **Angular**
|
|
381
|
+
|
|
382
|
+
Generate **standalone components** (`--standalone`) or traditional module-based components.
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
# Standalone component (recommended)
|
|
386
|
+
svger-cli build ./my-svgs ./angular-components --framework angular --standalone
|
|
387
|
+
|
|
388
|
+
# Module-based component
|
|
389
|
+
svger-cli build ./my-svgs ./angular-components --framework angular
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**Generated Angular Component (`.component.ts`):**
|
|
393
|
+
|
|
394
|
+
```typescript
|
|
395
|
+
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
|
396
|
+
|
|
397
|
+
@Component({
|
|
398
|
+
selector: 'app-my-icon',
|
|
399
|
+
standalone: true,
|
|
400
|
+
template: `
|
|
401
|
+
<svg
|
|
402
|
+
[attr.width]="size"
|
|
403
|
+
[attr.height]="size"
|
|
404
|
+
viewBox="0 0 24 24"
|
|
405
|
+
>
|
|
406
|
+
{/* SVG content */}
|
|
407
|
+
</svg>
|
|
408
|
+
`,
|
|
409
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
410
|
+
})
|
|
411
|
+
export class MyIconComponent {
|
|
412
|
+
@Input() size: number | string = 24;
|
|
413
|
+
}
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### **Svelte**
|
|
417
|
+
|
|
418
|
+
Create native Svelte components with TypeScript props.
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
svger-cli build ./my-svgs ./svelte-components --framework svelte
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
**Generated Svelte Component (`.svelte`):**
|
|
425
|
+
|
|
426
|
+
```html
|
|
427
|
+
<script lang="ts">
|
|
428
|
+
export let size: number | string = 24;
|
|
429
|
+
</script>
|
|
430
|
+
|
|
431
|
+
<svg width="{size}" height="{size}" viewBox="0 0 24 24" {...$$restProps}>{/* SVG content */}</svg>
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### **Solid**
|
|
435
|
+
|
|
436
|
+
Generate efficient SolidJS components.
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
svger-cli build ./my-svgs ./solid-components --framework solid
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**Generated Solid Component (`.tsx`):**
|
|
443
|
+
|
|
444
|
+
```tsx
|
|
445
|
+
import type { Component, JSX } from 'solid-js';
|
|
446
|
+
|
|
447
|
+
interface IconProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
|
|
448
|
+
size?: number | string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const MyIcon: Component<IconProps> = props => {
|
|
452
|
+
return (
|
|
453
|
+
<svg width={props.size || 24} height={props.size || 24} viewBox="0 0 24 24" {...props}>
|
|
454
|
+
{/* SVG content */}
|
|
455
|
+
</svg>
|
|
456
|
+
);
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
export default MyIcon;
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### **Lit**
|
|
463
|
+
|
|
464
|
+
Generate standard Web Components using the Lit library.
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
svger-cli build ./my-svgs ./lit-components --framework lit
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Generated Lit Component (`.ts`):**
|
|
471
|
+
|
|
472
|
+
```ts
|
|
473
|
+
import { LitElement, html, svg } from 'lit';
|
|
474
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
475
|
+
|
|
476
|
+
@customElement('my-icon')
|
|
477
|
+
export class MyIcon extends LitElement {
|
|
478
|
+
@property({ type: Number })
|
|
479
|
+
size = 24;
|
|
480
|
+
|
|
481
|
+
render() {
|
|
482
|
+
return html`
|
|
483
|
+
<svg width=${this.size} height=${this.size} viewBox="0 0 24 24">
|
|
484
|
+
${svg`{/* SVG content */}`}
|
|
485
|
+
</svg>
|
|
486
|
+
`;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### **Preact**
|
|
492
|
+
|
|
493
|
+
Generate lightweight Preact components.
|
|
494
|
+
|
|
495
|
+
```bash
|
|
496
|
+
svger-cli build ./my-svgs ./preact-components --framework preact
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
**Generated Preact Component (`.tsx`):**
|
|
500
|
+
|
|
501
|
+
```tsx
|
|
502
|
+
import { h } from 'preact';
|
|
503
|
+
import type { FunctionalComponent } from 'preact';
|
|
504
|
+
|
|
505
|
+
interface IconProps extends h.JSX.SVGAttributes<SVGSVGElement> {
|
|
506
|
+
size?: number | string;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
const MyIcon: FunctionalComponent<IconProps> = ({ size = 24, ...props }) => {
|
|
510
|
+
return (
|
|
511
|
+
<svg width={size} height={size} viewBox="0 0 24 24" {...props}>
|
|
512
|
+
{/* SVG content */}
|
|
513
|
+
</svg>
|
|
514
|
+
);
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
export default MyIcon;
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### **Vanilla JS/TS**
|
|
521
|
+
|
|
522
|
+
Generate framework-agnostic factory functions for use anywhere.
|
|
523
|
+
|
|
524
|
+
```bash
|
|
525
|
+
svger-cli build ./my-svgs ./vanilla-components --framework vanilla
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
**Generated Vanilla Component (`.ts`):**
|
|
529
|
+
|
|
530
|
+
```ts
|
|
531
|
+
interface IconOptions {
|
|
532
|
+
size?: number | string;
|
|
533
|
+
[key: string]: any;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export function createMyIcon(options: IconOptions = {}): SVGSVGElement {
|
|
537
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
538
|
+
const size = options.size || 24;
|
|
539
|
+
|
|
540
|
+
svg.setAttribute('width', String(size));
|
|
541
|
+
svg.setAttribute('height', String(size));
|
|
542
|
+
svg.setAttribute('viewBox', '0 0 24 24');
|
|
543
|
+
|
|
544
|
+
svg.innerHTML = `{/* SVG content */}`;
|
|
545
|
+
return svg;
|
|
546
|
+
}
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
## 🔧 **Comprehensive CLI Reference**
|
|
552
|
+
|
|
553
|
+
### **📋 CLI Commands Overview**
|
|
554
|
+
|
|
555
|
+
| Command | Purpose | Quick Link |
|
|
556
|
+
| ----------------------- | -------------------------- | -------------------------------------- |
|
|
557
|
+
| `svger-cli init` | Setup configuration | [Init](#1-initialize-command) |
|
|
558
|
+
| `svger-cli build` | Convert SVGs to components | [Build](#2-build-command) |
|
|
559
|
+
| `svger-cli watch` | Monitor & auto-generate | [Watch](#3-watch-command) |
|
|
560
|
+
| `svger-cli generate` | Process specific files | [Generate](#4-generate-command) |
|
|
561
|
+
| `svger-cli lock` | Protect files | [Lock/Unlock](#5-lockun lock-commands) |
|
|
562
|
+
| `svger-cli config` | Manage settings | [Config](#6-config-command) |
|
|
563
|
+
| `svger-cli clean` | Remove generated files | [Clean](#7-clean-command) |
|
|
564
|
+
| `svger-cli performance` | Analyze performance | [Performance](#8-performance-command) |
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
### **1️⃣ Initialize Command**
|
|
569
|
+
|
|
570
|
+
Set up SVGER-CLI configuration for your project.
|
|
571
|
+
|
|
572
|
+
```bash
|
|
573
|
+
svger-cli init [options]
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
**Options:**
|
|
577
|
+
|
|
578
|
+
- `--framework <type>` - Target framework (react|vue|svelte|angular|solid|preact|lit|vanilla)
|
|
579
|
+
- `--typescript` - Enable TypeScript generation (default: true)
|
|
580
|
+
- `--src <path>` - Source directory for SVG files (default: ./src/assets/svg)
|
|
581
|
+
- `--out <path>` - Output directory for components (default: ./src/components/icons)
|
|
582
|
+
- `--interactive` - Interactive configuration wizard
|
|
583
|
+
|
|
584
|
+
**Examples:**
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
# Initialize with React + TypeScript
|
|
588
|
+
svger-cli init --framework react --typescript
|
|
589
|
+
|
|
590
|
+
# Initialize with Vue Composition API
|
|
591
|
+
svger-cli init --framework vue --composition --typescript
|
|
592
|
+
|
|
593
|
+
# Interactive setup
|
|
594
|
+
svger-cli init --interactive
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
**Generated Configuration (`.svgerconfig.json`):**
|
|
598
|
+
|
|
599
|
+
```json
|
|
600
|
+
{
|
|
601
|
+
"source": "./src/assets/svg",
|
|
602
|
+
"output": "./src/components/icons",
|
|
603
|
+
"framework": "react",
|
|
604
|
+
"typescript": true,
|
|
605
|
+
"componentType": "functional",
|
|
606
|
+
|
|
607
|
+
"watch": false,
|
|
608
|
+
"parallel": true,
|
|
609
|
+
"batchSize": 10,
|
|
610
|
+
"maxConcurrency": 4,
|
|
611
|
+
"cache": true,
|
|
612
|
+
|
|
613
|
+
"defaultWidth": 24,
|
|
614
|
+
"defaultHeight": 24,
|
|
615
|
+
"defaultFill": "currentColor",
|
|
616
|
+
"defaultStroke": "none",
|
|
617
|
+
"defaultStrokeWidth": 1,
|
|
618
|
+
|
|
619
|
+
"exclude": ["logo.svg"],
|
|
620
|
+
"include": ["icons/**", "illustrations/**"],
|
|
621
|
+
|
|
622
|
+
"styleRules": {
|
|
623
|
+
"fill": "inherit",
|
|
624
|
+
"stroke": "none",
|
|
625
|
+
"strokeWidth": "1",
|
|
626
|
+
"opacity": "1"
|
|
627
|
+
},
|
|
628
|
+
|
|
629
|
+
"responsive": {
|
|
630
|
+
"breakpoints": ["sm", "md", "lg", "xl"],
|
|
631
|
+
"values": {
|
|
632
|
+
"width": ["16px", "20px", "24px", "32px"],
|
|
633
|
+
"height": ["16px", "20px", "24px", "32px"]
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
|
|
637
|
+
"theme": {
|
|
638
|
+
"mode": "auto",
|
|
639
|
+
"variables": {
|
|
640
|
+
"primary": "currentColor",
|
|
641
|
+
"secondary": "#6b7280",
|
|
642
|
+
"accent": "#3b82f6",
|
|
643
|
+
"background": "#ffffff",
|
|
644
|
+
"foreground": "#000000"
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
|
|
648
|
+
"animations": ["fadeIn", "slideIn", "bounce"],
|
|
649
|
+
|
|
650
|
+
"plugins": [
|
|
651
|
+
{
|
|
652
|
+
"name": "svg-optimizer",
|
|
653
|
+
"options": {
|
|
654
|
+
"removeComments": true,
|
|
655
|
+
"removeMetadata": true
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
],
|
|
659
|
+
|
|
660
|
+
"errorHandling": {
|
|
661
|
+
"strategy": "continue",
|
|
662
|
+
"maxRetries": 3,
|
|
663
|
+
"timeout": 30000
|
|
664
|
+
},
|
|
665
|
+
|
|
666
|
+
"performance": {
|
|
667
|
+
"optimization": "balanced",
|
|
668
|
+
"memoryLimit": 512,
|
|
669
|
+
"cacheTimeout": 3600000
|
|
670
|
+
},
|
|
671
|
+
|
|
672
|
+
"outputConfig": {
|
|
673
|
+
"naming": "pascal",
|
|
674
|
+
"extension": "tsx",
|
|
675
|
+
"directory": "./src/components/icons"
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
"react": {
|
|
679
|
+
"componentType": "functional",
|
|
680
|
+
"forwardRef": true,
|
|
681
|
+
"memo": false,
|
|
682
|
+
"propsInterface": "SVGProps",
|
|
683
|
+
"styledComponents": false,
|
|
684
|
+
"cssModules": false
|
|
685
|
+
},
|
|
686
|
+
|
|
687
|
+
"vue": {
|
|
688
|
+
"api": "composition",
|
|
689
|
+
"setup": true,
|
|
690
|
+
"typescript": true,
|
|
691
|
+
"scoped": true,
|
|
692
|
+
"cssVariables": true
|
|
693
|
+
},
|
|
694
|
+
|
|
695
|
+
"angular": {
|
|
696
|
+
"standalone": true,
|
|
697
|
+
"signals": true,
|
|
698
|
+
"changeDetection": "OnPush",
|
|
699
|
+
"encapsulation": "Emulated"
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
### **2️⃣ Build Command**
|
|
705
|
+
|
|
706
|
+
Convert SVG files to framework components with advanced processing.
|
|
707
|
+
|
|
708
|
+
```bash
|
|
709
|
+
svger-cli build [options]
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
**Core Options:**
|
|
713
|
+
|
|
714
|
+
- `--src <path>` - Source directory containing SVG files
|
|
715
|
+
- `--out <path>` - Output directory for generated components
|
|
716
|
+
- `--framework <type>` - Target framework for component generation
|
|
717
|
+
- `--typescript` - Generate TypeScript components (default: true)
|
|
718
|
+
- `--clean` - Clean output directory before building
|
|
719
|
+
|
|
720
|
+
**Performance Options:**
|
|
721
|
+
|
|
722
|
+
- `--parallel` - Enable parallel processing (default: true)
|
|
723
|
+
- `--batch-size <number>` - Number of files per batch (default: 10)
|
|
724
|
+
- `--max-concurrency <number>` - Maximum concurrent processes (default: CPU cores)
|
|
725
|
+
- `--cache` - Enable processing cache for faster rebuilds
|
|
726
|
+
- `--performance` - Display performance metrics
|
|
727
|
+
|
|
728
|
+
**Framework-Specific Options:**
|
|
729
|
+
|
|
730
|
+
- `--composition` - Use Vue Composition API (Vue only)
|
|
731
|
+
- `--setup` - Use Vue script setup syntax (Vue only)
|
|
732
|
+
- `--standalone` - Generate Angular standalone components (Angular only)
|
|
733
|
+
- `--signals` - Use signals for state management (Solid/Angular)
|
|
734
|
+
- `--forward-ref` - Generate React forwardRef components (React only)
|
|
735
|
+
|
|
736
|
+
**Styling Options:**
|
|
737
|
+
|
|
738
|
+
- `--responsive` - Enable responsive design utilities
|
|
739
|
+
- `--theme <mode>` - Apply theme mode (light|dark|auto)
|
|
740
|
+
- `--styled-components` - Generate styled-components (React/Solid)
|
|
741
|
+
- `--css-modules` - Enable CSS Modules support
|
|
742
|
+
|
|
743
|
+
**Examples:**
|
|
744
|
+
|
|
745
|
+
```bash
|
|
746
|
+
# Basic build
|
|
747
|
+
svger-cli build --src ./icons --out ./components
|
|
748
|
+
|
|
749
|
+
# Advanced React build with styling
|
|
750
|
+
svger-cli build \
|
|
751
|
+
--src ./icons \
|
|
752
|
+
--out ./components \
|
|
753
|
+
--framework react \
|
|
754
|
+
--typescript \
|
|
755
|
+
--forward-ref \
|
|
756
|
+
--styled-components \
|
|
757
|
+
--responsive \
|
|
758
|
+
--theme dark
|
|
759
|
+
|
|
760
|
+
# High-performance Vue build
|
|
761
|
+
svger-cli build \
|
|
762
|
+
--src ./icons \
|
|
763
|
+
--out ./components \
|
|
764
|
+
--framework vue \
|
|
765
|
+
--composition \
|
|
766
|
+
--setup \
|
|
767
|
+
--parallel \
|
|
768
|
+
--batch-size 20 \
|
|
769
|
+
--cache \
|
|
770
|
+
--performance
|
|
771
|
+
|
|
772
|
+
# Angular standalone components
|
|
773
|
+
svger-cli build \
|
|
774
|
+
--src ./icons \
|
|
775
|
+
--out ./components \
|
|
776
|
+
--framework angular \
|
|
777
|
+
--standalone \
|
|
778
|
+
--typescript \
|
|
779
|
+
--signals
|
|
780
|
+
|
|
781
|
+
# Vanilla TypeScript with optimization
|
|
782
|
+
svger-cli build \
|
|
783
|
+
--src ./icons \
|
|
784
|
+
--out ./components \
|
|
785
|
+
--framework vanilla \
|
|
786
|
+
--typescript \
|
|
787
|
+
--optimization maximum
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
### **3️⃣ Watch Command**
|
|
791
|
+
|
|
792
|
+
Monitor directories for SVG changes and auto-generate components.
|
|
793
|
+
|
|
794
|
+
```bash
|
|
795
|
+
svger-cli watch [options]
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
**Options:**
|
|
799
|
+
|
|
800
|
+
- All `build` command options
|
|
801
|
+
- `--debounce <ms>` - Debounce time for file changes (default: 300ms)
|
|
802
|
+
- `--ignore <patterns>` - Ignore file patterns (glob syntax)
|
|
803
|
+
- `--verbose` - Detailed logging of file changes
|
|
804
|
+
|
|
805
|
+
**Examples:**
|
|
806
|
+
|
|
807
|
+
```bash
|
|
808
|
+
# Basic watch mode
|
|
809
|
+
svger-cli watch --src ./icons --out ./components
|
|
810
|
+
|
|
811
|
+
# Advanced watch with debouncing
|
|
812
|
+
svger-cli watch \
|
|
813
|
+
--src ./icons \
|
|
814
|
+
--out ./components \
|
|
815
|
+
--framework react \
|
|
816
|
+
--debounce 500 \
|
|
817
|
+
--ignore "**/*.tmp" \
|
|
818
|
+
--verbose
|
|
819
|
+
|
|
820
|
+
# Production watch mode
|
|
821
|
+
svger-cli watch \
|
|
822
|
+
--src ./icons \
|
|
823
|
+
--out ./components \
|
|
824
|
+
--framework vue \
|
|
825
|
+
--composition \
|
|
826
|
+
--parallel \
|
|
827
|
+
--cache \
|
|
828
|
+
--performance
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
### **4️⃣ Generate Command**
|
|
832
|
+
|
|
833
|
+
Process specific SVG files with precise control.
|
|
834
|
+
|
|
835
|
+
```bash
|
|
836
|
+
svger-cli generate <input> [options]
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
**Arguments:**
|
|
840
|
+
|
|
841
|
+
- `<input>` - SVG file path or glob pattern
|
|
842
|
+
|
|
843
|
+
**Options:**
|
|
844
|
+
|
|
845
|
+
- All `build` command options
|
|
846
|
+
- `--name <string>` - Override component name
|
|
847
|
+
- `--template <type>` - Component template (functional|class|forwardRef|memo)
|
|
848
|
+
|
|
849
|
+
**Examples:**
|
|
850
|
+
|
|
851
|
+
```bash
|
|
852
|
+
# Generate single component
|
|
853
|
+
svger-cli generate ./icons/heart.svg --out ./components --name HeartIcon
|
|
854
|
+
|
|
855
|
+
# Generate with custom template
|
|
856
|
+
svger-cli generate ./icons/star.svg \
|
|
857
|
+
--out ./components \
|
|
858
|
+
--framework react \
|
|
859
|
+
--template forwardRef \
|
|
860
|
+
--typescript
|
|
861
|
+
|
|
862
|
+
# Generate multiple files with glob
|
|
863
|
+
svger-cli generate "./icons/social-*.svg" \
|
|
864
|
+
--out ./components/social \
|
|
865
|
+
--framework vue \
|
|
866
|
+
--composition
|
|
867
|
+
|
|
868
|
+
# Generate with advanced styling
|
|
869
|
+
svger-cli generate ./icons/logo.svg \
|
|
870
|
+
--out ./components \
|
|
871
|
+
--name CompanyLogo \
|
|
872
|
+
--styled-components \
|
|
873
|
+
--responsive \
|
|
874
|
+
--theme dark
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
### **5️⃣ Lock/Unlock Commands**
|
|
878
|
+
|
|
879
|
+
Manage file protection during batch operations.
|
|
880
|
+
|
|
881
|
+
```bash
|
|
882
|
+
svger-cli lock <files...>
|
|
883
|
+
svger-cli unlock <files...>
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
**Examples:**
|
|
887
|
+
|
|
888
|
+
```bash
|
|
889
|
+
# Lock specific files
|
|
890
|
+
svger-cli lock ./icons/logo.svg ./icons/brand.svg
|
|
891
|
+
|
|
892
|
+
# Lock pattern
|
|
893
|
+
svger-cli lock "./icons/brand-*.svg"
|
|
894
|
+
|
|
895
|
+
# Unlock files
|
|
896
|
+
svger-cli unlock ./icons/logo.svg
|
|
897
|
+
|
|
898
|
+
# Unlock all
|
|
899
|
+
svger-cli unlock --all
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
### **6️⃣ Config Command**
|
|
903
|
+
|
|
904
|
+
Manage project configuration dynamically.
|
|
905
|
+
|
|
906
|
+
```bash
|
|
907
|
+
svger-cli config [options]
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
**Options:**
|
|
911
|
+
|
|
912
|
+
- `--show` - Display current configuration
|
|
913
|
+
- `--set <key=value>` - Set configuration value
|
|
914
|
+
- `--get <key>` - Get specific configuration value
|
|
915
|
+
- `--reset` - Reset to default configuration
|
|
916
|
+
- `--validate` - Validate current configuration
|
|
917
|
+
|
|
918
|
+
**Examples:**
|
|
919
|
+
|
|
920
|
+
```bash
|
|
921
|
+
# Show current config
|
|
922
|
+
svger-cli config --show
|
|
923
|
+
|
|
924
|
+
# Set configuration values
|
|
925
|
+
svger-cli config --set framework=vue
|
|
926
|
+
svger-cli config --set typescript=true
|
|
927
|
+
svger-cli config --set "defaultWidth=32"
|
|
928
|
+
svger-cli config --set "styleRules.fill=currentColor"
|
|
929
|
+
|
|
930
|
+
# Get specific value
|
|
931
|
+
svger-cli config --get framework
|
|
932
|
+
|
|
933
|
+
# Reset configuration
|
|
934
|
+
svger-cli config --reset
|
|
935
|
+
|
|
936
|
+
# Validate configuration
|
|
937
|
+
svger-cli config --validate
|
|
938
|
+
```
|
|
939
|
+
|
|
940
|
+
### **7️⃣ Clean Command**
|
|
941
|
+
|
|
942
|
+
Remove generated components and clean workspace.
|
|
943
|
+
|
|
944
|
+
```bash
|
|
945
|
+
svger-cli clean [options]
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
**Options:**
|
|
949
|
+
|
|
950
|
+
- `--out <path>` - Output directory to clean
|
|
951
|
+
- `--cache` - Clear processing cache
|
|
952
|
+
- `--logs` - Clear log files
|
|
953
|
+
- `--all` - Clean everything (components, cache, logs)
|
|
954
|
+
- `--dry-run` - Preview what would be cleaned
|
|
955
|
+
|
|
956
|
+
**Examples:**
|
|
957
|
+
|
|
958
|
+
```bash
|
|
959
|
+
# Clean output directory
|
|
960
|
+
svger-cli clean --out ./components
|
|
961
|
+
|
|
962
|
+
# Clean cache only
|
|
963
|
+
svger-cli clean --cache
|
|
964
|
+
|
|
965
|
+
# Clean everything
|
|
966
|
+
svger-cli clean --all
|
|
967
|
+
|
|
968
|
+
# Preview clean operation
|
|
969
|
+
svger-cli clean --all --dry-run
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
### **8️⃣ Performance Command**
|
|
973
|
+
|
|
974
|
+
Analyze and optimize processing performance.
|
|
975
|
+
|
|
976
|
+
```bash
|
|
977
|
+
svger-cli performance [options]
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
**Options:**
|
|
981
|
+
|
|
982
|
+
- `--analyze` - Analyze current project performance
|
|
983
|
+
- `--benchmark` - Run performance benchmarks
|
|
984
|
+
- `--memory` - Display memory usage statistics
|
|
985
|
+
- `--cache-stats` - Show cache performance statistics
|
|
986
|
+
- `--optimize` - Apply performance optimizations
|
|
987
|
+
|
|
988
|
+
**Examples:**
|
|
989
|
+
|
|
990
|
+
```bash
|
|
991
|
+
# Analyze performance
|
|
992
|
+
svger-cli performance --analyze
|
|
993
|
+
|
|
994
|
+
# Run benchmarks
|
|
995
|
+
svger-cli performance --benchmark
|
|
996
|
+
|
|
997
|
+
# Memory analysis
|
|
998
|
+
svger-cli performance --memory
|
|
999
|
+
|
|
1000
|
+
# Cache statistics
|
|
1001
|
+
svger-cli performance --cache-stats
|
|
1002
|
+
|
|
1003
|
+
# Apply optimizations
|
|
1004
|
+
svger-cli performance --optimize
|
|
1005
|
+
```
|
|
1006
|
+
|
|
1007
|
+
---
|
|
1008
|
+
|
|
1009
|
+
## 💻 **Usage Examples: From Simple to Complex**
|
|
1010
|
+
|
|
1011
|
+
### **Example Types & Complexity Levels**
|
|
1012
|
+
|
|
1013
|
+
| Complexity | Example | Purpose | Best For |
|
|
1014
|
+
| --------------- | ----------------------------------------------------------------- | ---------------------- | --------------------- |
|
|
1015
|
+
| 🟢 Beginner | [Example 1](#-example-1-quick-start-simplest) | Basic SVG conversion | Getting started |
|
|
1016
|
+
| 🟡 Intermediate | [Example 2](#-example-2-production-setup-intermediate) | Production-ready setup | Small to medium teams |
|
|
1017
|
+
| 🔴 Advanced | [Example 3](#-example-3-enterprise-multi-framework-advanced) | Multi-framework setup | Enterprise projects |
|
|
1018
|
+
| � Expert | [Example 4](#-example-4-file-protection--team-workflows-advanced) | Team collaboration | Large teams |
|
|
1019
|
+
| ⚡ Performance | [Example 5](#-example-5-performance-optimization-expert) | Optimization | Large-scale projects |
|
|
1020
|
+
|
|
1021
|
+
---
|
|
1022
|
+
|
|
1023
|
+
### **🟢 Example 1: Quick Start (Simplest)**
|
|
1024
|
+
|
|
1025
|
+
Get started in 30 seconds:
|
|
1026
|
+
|
|
1027
|
+
```bash
|
|
1028
|
+
# Install globally
|
|
1029
|
+
npm install -g svger-cli
|
|
1030
|
+
|
|
1031
|
+
# Convert SVGs to React components
|
|
1032
|
+
svger-cli build ./my-icons ./components
|
|
1033
|
+
|
|
1034
|
+
# Use the auto-generated exports
|
|
1035
|
+
import { ArrowLeft, Home, User } from './components';
|
|
1036
|
+
|
|
1037
|
+
function App() {
|
|
1038
|
+
return (
|
|
1039
|
+
<div>
|
|
1040
|
+
<ArrowLeft />
|
|
1041
|
+
<Home className="text-blue-500" />
|
|
1042
|
+
<User size={32} style={{ color: 'red' }} />
|
|
1043
|
+
</div>
|
|
1044
|
+
);
|
|
1045
|
+
}
|
|
1046
|
+
```
|
|
1047
|
+
|
|
1048
|
+
**What happens:**
|
|
1049
|
+
|
|
1050
|
+
- ✅ All SVGs in `./my-icons` converted to React components
|
|
1051
|
+
- ✅ Auto-generated `index.ts` with clean exports
|
|
1052
|
+
- ✅ Components support `className`, `style`, `size` props
|
|
1053
|
+
- ✅ TypeScript interfaces automatically included
|
|
1054
|
+
|
|
1055
|
+
---
|
|
1056
|
+
|
|
1057
|
+
### **� Example 2: Production Setup (Intermediate)**
|
|
1058
|
+
|
|
1059
|
+
Professional setup with configuration and optimization:
|
|
1060
|
+
|
|
1061
|
+
```bash
|
|
1062
|
+
# Initialize with custom configuration
|
|
1063
|
+
svger-cli init --framework react --typescript --interactive
|
|
1064
|
+
|
|
1065
|
+
# Generated .svgerconfig.json:
|
|
1066
|
+
{
|
|
1067
|
+
"source": "./src/assets/icons",
|
|
1068
|
+
"output": "./src/components/icons",
|
|
1069
|
+
"framework": "react",
|
|
1070
|
+
"typescript": true,
|
|
1071
|
+
"forwardRef": true,
|
|
1072
|
+
"parallel": true,
|
|
1073
|
+
"batchSize": 15,
|
|
1074
|
+
"responsive": {
|
|
1075
|
+
"breakpoints": ["sm", "md", "lg"],
|
|
1076
|
+
"values": {
|
|
1077
|
+
"width": ["16px", "24px", "32px"]
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
# Build with optimizations
|
|
1083
|
+
svger-cli build --performance --cache
|
|
1084
|
+
|
|
1085
|
+
# Start development mode
|
|
1086
|
+
svger-cli watch --debounce 500 --verbose
|
|
1087
|
+
```
|
|
1088
|
+
|
|
1089
|
+
**Generated Components:**
|
|
1090
|
+
|
|
1091
|
+
```typescript
|
|
1092
|
+
// Auto-generated: src/components/icons/ArrowLeft.tsx
|
|
1093
|
+
import React from 'react';
|
|
1094
|
+
|
|
1095
|
+
interface ArrowLeftProps extends React.SVGProps<SVGSVGElement> {
|
|
1096
|
+
size?: number | 'sm' | 'md' | 'lg';
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
const ArrowLeft = React.forwardRef<SVGSVGElement, ArrowLeftProps>(
|
|
1100
|
+
({ size = 24, className, style, ...props }, ref) => {
|
|
1101
|
+
const sizeValue = typeof size === 'string'
|
|
1102
|
+
? { sm: 16, md: 24, lg: 32 }[size]
|
|
1103
|
+
: size;
|
|
1104
|
+
|
|
1105
|
+
return (
|
|
1106
|
+
<svg
|
|
1107
|
+
ref={ref}
|
|
1108
|
+
width={sizeValue}
|
|
1109
|
+
height={sizeValue}
|
|
1110
|
+
viewBox="0 0 24 24"
|
|
1111
|
+
fill="none"
|
|
1112
|
+
className={className}
|
|
1113
|
+
style={style}
|
|
1114
|
+
{...props}
|
|
1115
|
+
>
|
|
1116
|
+
<path d="M19 12H5M12 19l-7-7 7-7" stroke="currentColor" strokeWidth="2"/>
|
|
1117
|
+
</svg>
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
|
|
1122
|
+
ArrowLeft.displayName = 'ArrowLeft';
|
|
1123
|
+
export default ArrowLeft;
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
**Auto-generated index.ts:**
|
|
1127
|
+
|
|
1128
|
+
```typescript
|
|
1129
|
+
/**
|
|
1130
|
+
* Auto-generated icon exports
|
|
1131
|
+
* Import icons: import { ArrowLeft, Home } from './components/icons'
|
|
1132
|
+
*/
|
|
1133
|
+
export { default as ArrowLeft } from './ArrowLeft';
|
|
1134
|
+
export { default as Home } from './Home';
|
|
1135
|
+
export { default as User } from './User';
|
|
1136
|
+
|
|
1137
|
+
// Default export for flexible importing
|
|
1138
|
+
export default {
|
|
1139
|
+
ArrowLeft,
|
|
1140
|
+
Home,
|
|
1141
|
+
User,
|
|
1142
|
+
};
|
|
1143
|
+
```
|
|
1144
|
+
|
|
1145
|
+
**Usage in App:**
|
|
1146
|
+
|
|
1147
|
+
```typescript
|
|
1148
|
+
import { ArrowLeft, Home, User } from './components/icons';
|
|
1149
|
+
|
|
1150
|
+
function Navigation() {
|
|
1151
|
+
return (
|
|
1152
|
+
<nav className="flex items-center space-x-4">
|
|
1153
|
+
<ArrowLeft
|
|
1154
|
+
size="sm"
|
|
1155
|
+
className="text-gray-600 hover:text-gray-900"
|
|
1156
|
+
onClick={() => history.back()}
|
|
1157
|
+
/>
|
|
1158
|
+
<Home
|
|
1159
|
+
size={28}
|
|
1160
|
+
style={{ color: 'var(--primary-color)' }}
|
|
1161
|
+
/>
|
|
1162
|
+
<User
|
|
1163
|
+
className="w-6 h-6 text-blue-500"
|
|
1164
|
+
ref={userIconRef}
|
|
1165
|
+
/>
|
|
1166
|
+
</nav>
|
|
1167
|
+
);
|
|
1168
|
+
}
|
|
1169
|
+
```
|
|
1170
|
+
|
|
1171
|
+
---
|
|
1172
|
+
|
|
1173
|
+
### **🔴 Example 3: Enterprise Multi-Framework (Advanced)**
|
|
1174
|
+
|
|
1175
|
+
Complete enterprise setup supporting multiple frameworks:
|
|
1176
|
+
|
|
1177
|
+
```bash
|
|
1178
|
+
# Project structure
|
|
1179
|
+
my-design-system/
|
|
1180
|
+
├── icons/ # Source SVG files
|
|
1181
|
+
├── react-components/ # React output
|
|
1182
|
+
├── vue-components/ # Vue output
|
|
1183
|
+
├── angular-components/ # Angular output
|
|
1184
|
+
└── vanilla-components/ # Vanilla JS/TS output
|
|
1185
|
+
|
|
1186
|
+
# Generate for React with full features
|
|
1187
|
+
svger-cli build \
|
|
1188
|
+
--src ./icons \
|
|
1189
|
+
--out ./react-components \
|
|
1190
|
+
--framework react \
|
|
1191
|
+
--typescript \
|
|
1192
|
+
--forward-ref \
|
|
1193
|
+
--styled-components \
|
|
1194
|
+
--responsive \
|
|
1195
|
+
--theme dark \
|
|
1196
|
+
--parallel \
|
|
1197
|
+
--batch-size 20 \
|
|
1198
|
+
--performance
|
|
1199
|
+
|
|
1200
|
+
# Generate for Vue with Composition API
|
|
1201
|
+
svger-cli build \
|
|
1202
|
+
--src ./icons \
|
|
1203
|
+
--out ./vue-components \
|
|
1204
|
+
--framework vue \
|
|
1205
|
+
--composition \
|
|
1206
|
+
--setup \
|
|
1207
|
+
--typescript \
|
|
1208
|
+
--responsive
|
|
1209
|
+
|
|
1210
|
+
# Generate for Angular with standalone components
|
|
1211
|
+
svger-cli build \
|
|
1212
|
+
--src ./icons \
|
|
1213
|
+
--out ./angular-components \
|
|
1214
|
+
--framework angular \
|
|
1215
|
+
--standalone \
|
|
1216
|
+
--signals \
|
|
1217
|
+
--typescript
|
|
1218
|
+
|
|
1219
|
+
# Generate vanilla TypeScript for maximum compatibility
|
|
1220
|
+
svger-cli build \
|
|
1221
|
+
--src ./icons \
|
|
1222
|
+
--out ./vanilla-components \
|
|
1223
|
+
--framework vanilla \
|
|
1224
|
+
--typescript
|
|
1225
|
+
```
|
|
1226
|
+
|
|
1227
|
+
**React Components with Styled Components:**
|
|
1228
|
+
|
|
1229
|
+
```typescript
|
|
1230
|
+
// Generated: react-components/ArrowLeft.tsx
|
|
1231
|
+
import React from 'react';
|
|
1232
|
+
import styled, { css } from 'styled-components';
|
|
1233
|
+
|
|
1234
|
+
interface ArrowLeftProps extends React.SVGProps<SVGSVGElement> {
|
|
1235
|
+
size?: number | 'sm' | 'md' | 'lg' | 'xl';
|
|
1236
|
+
variant?: 'primary' | 'secondary' | 'accent';
|
|
1237
|
+
theme?: 'light' | 'dark';
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
const StyledSVG = styled.svg<ArrowLeftProps>`
|
|
1241
|
+
${({ theme, variant }) => css`
|
|
1242
|
+
color: ${theme === 'dark'
|
|
1243
|
+
? 'var(--icon-color-dark)'
|
|
1244
|
+
: 'var(--icon-color-light)'};
|
|
1245
|
+
|
|
1246
|
+
${variant === 'primary' && css`
|
|
1247
|
+
color: var(--primary-color);
|
|
1248
|
+
`}
|
|
1249
|
+
|
|
1250
|
+
${variant === 'secondary' && css`
|
|
1251
|
+
color: var(--secondary-color);
|
|
1252
|
+
`}
|
|
1253
|
+
|
|
1254
|
+
${variant === 'accent' && css`
|
|
1255
|
+
color: var(--accent-color);
|
|
1256
|
+
`}
|
|
1257
|
+
|
|
1258
|
+
transition: all 0.2s ease;
|
|
1259
|
+
|
|
1260
|
+
&:hover {
|
|
1261
|
+
transform: scale(1.1);
|
|
1262
|
+
}
|
|
1263
|
+
`}
|
|
1264
|
+
`;
|
|
1265
|
+
|
|
1266
|
+
const ArrowLeft = React.forwardRef<SVGSVGElement, ArrowLeftProps>(
|
|
1267
|
+
({ size = 'md', variant = 'primary', theme = 'light', ...props }, ref) => {
|
|
1268
|
+
const sizeMap = {
|
|
1269
|
+
sm: 16, md: 24, lg: 32, xl: 40
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
const sizeValue = typeof size === 'string' ? sizeMap[size] : size;
|
|
1273
|
+
|
|
1274
|
+
return (
|
|
1275
|
+
<StyledSVG
|
|
1276
|
+
ref={ref}
|
|
1277
|
+
width={sizeValue}
|
|
1278
|
+
height={sizeValue}
|
|
1279
|
+
viewBox="0 0 24 24"
|
|
1280
|
+
fill="none"
|
|
1281
|
+
variant={variant}
|
|
1282
|
+
theme={theme}
|
|
1283
|
+
{...props}
|
|
1284
|
+
>
|
|
1285
|
+
<path
|
|
1286
|
+
d="M19 12H5M12 19l-7-7 7-7"
|
|
1287
|
+
stroke="currentColor"
|
|
1288
|
+
strokeWidth="2"
|
|
1289
|
+
/>
|
|
1290
|
+
</StyledSVG>
|
|
1291
|
+
);
|
|
1292
|
+
}
|
|
1293
|
+
);
|
|
1294
|
+
|
|
1295
|
+
ArrowLeft.displayName = 'ArrowLeft';
|
|
1296
|
+
export default ArrowLeft;
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
**Vue Composition API Components:**
|
|
1300
|
+
|
|
1301
|
+
```vue
|
|
1302
|
+
<!-- Generated: vue-components/ArrowLeft.vue -->
|
|
1303
|
+
<script setup lang="ts">
|
|
1304
|
+
interface Props {
|
|
1305
|
+
size?: number | 'sm' | 'md' | 'lg';
|
|
1306
|
+
className?: string;
|
|
1307
|
+
style?: Record<string, any>;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
1311
|
+
size: 'md',
|
|
1312
|
+
});
|
|
1313
|
+
|
|
1314
|
+
const sizeValue = computed(() => {
|
|
1315
|
+
if (typeof props.size === 'string') {
|
|
1316
|
+
return { sm: 16, md: 24, lg: 32 }[props.size];
|
|
1317
|
+
}
|
|
1318
|
+
return props.size;
|
|
1319
|
+
});
|
|
1320
|
+
</script>
|
|
1321
|
+
|
|
1322
|
+
<template>
|
|
1323
|
+
<svg
|
|
1324
|
+
:width="sizeValue"
|
|
1325
|
+
:height="sizeValue"
|
|
1326
|
+
viewBox="0 0 24 24"
|
|
1327
|
+
fill="none"
|
|
1328
|
+
:class="className"
|
|
1329
|
+
:style="style"
|
|
1330
|
+
v-bind="$attrs"
|
|
1331
|
+
>
|
|
1332
|
+
<path d="M19 12H5M12 19l-7-7 7-7" stroke="currentColor" stroke-width="2" />
|
|
1333
|
+
</svg>
|
|
1334
|
+
</template>
|
|
1335
|
+
|
|
1336
|
+
<style scoped>
|
|
1337
|
+
svg {
|
|
1338
|
+
color: var(--icon-color, currentColor);
|
|
1339
|
+
transition: all 0.2s ease;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
svg:hover {
|
|
1343
|
+
transform: scale(1.05);
|
|
1344
|
+
}
|
|
1345
|
+
</style>
|
|
1346
|
+
```
|
|
1347
|
+
|
|
1348
|
+
**Angular Standalone Components:**
|
|
1349
|
+
|
|
1350
|
+
```typescript
|
|
1351
|
+
// Generated: angular-components/arrow-left.component.ts
|
|
1352
|
+
import { Component, Input, signal } from '@angular/core';
|
|
1353
|
+
import { CommonModule } from '@angular/common';
|
|
1354
|
+
|
|
1355
|
+
@Component({
|
|
1356
|
+
selector: 'app-arrow-left',
|
|
1357
|
+
standalone: true,
|
|
1358
|
+
imports: [CommonModule],
|
|
1359
|
+
template: `
|
|
1360
|
+
<svg
|
|
1361
|
+
[attr.width]="computedSize()"
|
|
1362
|
+
[attr.height]="computedSize()"
|
|
1363
|
+
viewBox="0 0 24 24"
|
|
1364
|
+
fill="none"
|
|
1365
|
+
[class]="className"
|
|
1366
|
+
[style]="style"
|
|
1367
|
+
>
|
|
1368
|
+
<path d="M19 12H5M12 19l-7-7 7-7" stroke="currentColor" stroke-width="2" />
|
|
1369
|
+
</svg>
|
|
1370
|
+
`,
|
|
1371
|
+
styles: [
|
|
1372
|
+
`
|
|
1373
|
+
svg {
|
|
1374
|
+
color: var(--icon-color, currentColor);
|
|
1375
|
+
transition: all 0.2s ease;
|
|
1376
|
+
}
|
|
1377
|
+
svg:hover {
|
|
1378
|
+
transform: scale(1.05);
|
|
1379
|
+
}
|
|
1380
|
+
`,
|
|
1381
|
+
],
|
|
1382
|
+
})
|
|
1383
|
+
export class ArrowLeftComponent {
|
|
1384
|
+
@Input() size: number | 'sm' | 'md' | 'lg' = 'md';
|
|
1385
|
+
@Input() className: string = '';
|
|
1386
|
+
@Input() style: Record<string, any> = {};
|
|
1387
|
+
|
|
1388
|
+
private sizeMap = { sm: 16, md: 24, lg: 32 };
|
|
1389
|
+
|
|
1390
|
+
computedSize = signal(() => {
|
|
1391
|
+
return typeof this.size === 'string' ? this.sizeMap[this.size] : this.size;
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1396
|
+
---
|
|
1397
|
+
|
|
1398
|
+
### **� Example 4: File Protection & Team Workflows (Advanced)**
|
|
1399
|
+
|
|
1400
|
+
Protect critical files and manage team workflows:
|
|
1401
|
+
|
|
1402
|
+
```bash
|
|
1403
|
+
# Lock critical brand assets
|
|
1404
|
+
svger-cli lock ./icons/logo.svg
|
|
1405
|
+
svger-cli lock ./icons/brand-mark.svg
|
|
1406
|
+
|
|
1407
|
+
# Build process automatically skips locked files
|
|
1408
|
+
svger-cli build ./icons ./components
|
|
1409
|
+
# ⚠️ Warning: Skipped locked file: logo.svg
|
|
1410
|
+
# ⚠️ Warning: Skipped locked file: brand-mark.svg
|
|
1411
|
+
# ✅ Generated 23 components (2 files locked)
|
|
1412
|
+
|
|
1413
|
+
# Watch mode respects locks
|
|
1414
|
+
svger-cli watch ./icons ./components
|
|
1415
|
+
# File changes to locked files are ignored
|
|
1416
|
+
|
|
1417
|
+
# Team workflow: selective unlocking
|
|
1418
|
+
svger-cli unlock ./icons/logo.svg --confirm
|
|
1419
|
+
svger-cli build ./icons ./components --force-locked-update
|
|
1420
|
+
|
|
1421
|
+
# List all locked files
|
|
1422
|
+
svger-cli status --locked
|
|
1423
|
+
```
|
|
1424
|
+
|
|
1425
|
+
**Team Configuration (.svgerconfig.json):**
|
|
1426
|
+
|
|
1427
|
+
```json
|
|
1428
|
+
{
|
|
1429
|
+
"source": "./src/assets/icons",
|
|
1430
|
+
"output": "./src/components/icons",
|
|
1431
|
+
"framework": "react",
|
|
1432
|
+
"typescript": true,
|
|
1433
|
+
"forwardRef": true,
|
|
1434
|
+
"lockedFiles": ["./src/assets/icons/logo.svg", "./src/assets/icons/brand-mark.svg"],
|
|
1435
|
+
"teamSettings": {
|
|
1436
|
+
"requireConfirmation": true,
|
|
1437
|
+
"lockByDefault": false,
|
|
1438
|
+
"autoLockPatterns": ["**/brand-*", "**/logo-*"]
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
```
|
|
1442
|
+
|
|
1443
|
+
---
|
|
1444
|
+
|
|
1445
|
+
### **⚡ Example 5: Performance Optimization (Expert)**
|
|
1446
|
+
|
|
1447
|
+
Maximum performance setup for large-scale projects:
|
|
1448
|
+
|
|
1449
|
+
```bash
|
|
1450
|
+
# Performance analysis
|
|
1451
|
+
svger-cli performance --analyze
|
|
1452
|
+
# 📊 Processing 1,247 SVG files
|
|
1453
|
+
# 📊 Average file size: 3.2KB
|
|
1454
|
+
# 📊 Estimated processing time: 2.1s
|
|
1455
|
+
# 💡 Recommendations:
|
|
1456
|
+
# - Increase batch size to 25
|
|
1457
|
+
# - Enable caching for 40% improvement
|
|
1458
|
+
# - Use parallel processing
|
|
1459
|
+
|
|
1460
|
+
# Apply performance optimizations
|
|
1461
|
+
svger-cli build \
|
|
1462
|
+
--src ./massive-icon-library \
|
|
1463
|
+
--out ./optimized-components \
|
|
1464
|
+
--framework react \
|
|
1465
|
+
--parallel \
|
|
1466
|
+
--batch-size 25 \
|
|
1467
|
+
--max-concurrency 8 \
|
|
1468
|
+
--cache \
|
|
1469
|
+
--performance \
|
|
1470
|
+
--memory-limit 512
|
|
1471
|
+
|
|
1472
|
+
# Monitor performance in real-time
|
|
1473
|
+
svger-cli performance --monitor &
|
|
1474
|
+
svger-cli watch ./icons ./components
|
|
1475
|
+
|
|
1476
|
+
# Advanced caching strategy
|
|
1477
|
+
svger-cli config set cache.strategy "aggressive"
|
|
1478
|
+
svger-cli config set cache.ttl 3600000 # 1 hour
|
|
1479
|
+
svger-cli config set cache.maxSize 1024 # 1GB
|
|
1480
|
+
|
|
1481
|
+
# Benchmark against previous versions
|
|
1482
|
+
svger-cli performance --benchmark --compare-with v1.5.0
|
|
1483
|
+
```
|
|
1484
|
+
|
|
1485
|
+
**Performance Configuration:**
|
|
1486
|
+
|
|
1487
|
+
```json
|
|
1488
|
+
{
|
|
1489
|
+
"performance": {
|
|
1490
|
+
"optimization": "maximum",
|
|
1491
|
+
"parallel": true,
|
|
1492
|
+
"batchSize": 25,
|
|
1493
|
+
"maxConcurrency": 8,
|
|
1494
|
+
"cache": {
|
|
1495
|
+
"enabled": true,
|
|
1496
|
+
"strategy": "aggressive",
|
|
1497
|
+
"ttl": 3600000,
|
|
1498
|
+
"maxSize": 1024
|
|
1499
|
+
},
|
|
1500
|
+
"memory": {
|
|
1501
|
+
"limit": 512,
|
|
1502
|
+
"gcInterval": 30000,
|
|
1503
|
+
"heapWarning": 400
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
```
|
|
1508
|
+
|
|
1509
|
+
**Enterprise Usage Patterns:**
|
|
1510
|
+
|
|
1511
|
+
```typescript
|
|
1512
|
+
// Large-scale import pattern
|
|
1513
|
+
import IconLibrary from './components/icons';
|
|
1514
|
+
|
|
1515
|
+
// Lazy loading for performance
|
|
1516
|
+
const LazyIcon = React.lazy(() => import('./components/icons/SpecificIcon'));
|
|
1517
|
+
|
|
1518
|
+
// Tree-shaking friendly imports
|
|
1519
|
+
import {
|
|
1520
|
+
ArrowLeft,
|
|
1521
|
+
ArrowRight,
|
|
1522
|
+
Home,
|
|
1523
|
+
User,
|
|
1524
|
+
Settings
|
|
1525
|
+
} from './components/icons';
|
|
1526
|
+
|
|
1527
|
+
// Dynamic icon loading
|
|
1528
|
+
const DynamicIcon = ({ name, ...props }) => {
|
|
1529
|
+
const IconComponent = IconLibrary[name];
|
|
1530
|
+
return IconComponent ? <IconComponent {...props} /> : null;
|
|
1531
|
+
};
|
|
1532
|
+
```
|
|
1533
|
+
|
|
1534
|
+
---
|
|
1535
|
+
|
|
1536
|
+
## 🎨 **Advanced Styling & Theming**
|
|
1537
|
+
|
|
1538
|
+
### **Responsive Design System**
|
|
1539
|
+
|
|
1540
|
+
SVGER-CLI includes a comprehensive responsive design system:
|
|
1541
|
+
|
|
1542
|
+
```bash
|
|
1543
|
+
# Enable responsive design
|
|
1544
|
+
svger-cli build --responsive --src ./icons --out ./components
|
|
1545
|
+
```
|
|
1546
|
+
|
|
1547
|
+
**Configuration:**
|
|
1548
|
+
|
|
1549
|
+
```json
|
|
1550
|
+
{
|
|
1551
|
+
"responsive": {
|
|
1552
|
+
"breakpoints": ["sm", "md", "lg", "xl"],
|
|
1553
|
+
"values": {
|
|
1554
|
+
"width": ["16px", "20px", "24px", "32px"],
|
|
1555
|
+
"height": ["16px", "20px", "24px", "32px"],
|
|
1556
|
+
"strokeWidth": ["1", "1.5", "2", "2.5"]
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
```
|
|
1561
|
+
|
|
1562
|
+
**Generated React Component:**
|
|
1563
|
+
|
|
1564
|
+
```tsx
|
|
1565
|
+
interface ResponsiveIconProps extends React.SVGProps<SVGSVGElement> {
|
|
1566
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
const ResponsiveIcon: React.FC<ResponsiveIconProps> = ({ size = 'md', ...props }) => {
|
|
1570
|
+
const sizeMap = {
|
|
1571
|
+
sm: { width: 16, height: 16 },
|
|
1572
|
+
md: { width: 20, height: 20 },
|
|
1573
|
+
lg: { width: 24, height: 24 },
|
|
1574
|
+
xl: { width: 32, height: 32 },
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
return (
|
|
1578
|
+
<svg {...sizeMap[size]} {...props}>
|
|
1579
|
+
...
|
|
1580
|
+
</svg>
|
|
1581
|
+
);
|
|
1582
|
+
};
|
|
1583
|
+
```
|
|
1584
|
+
|
|
1585
|
+
### **Theme System**
|
|
1586
|
+
|
|
1587
|
+
Built-in dark/light theme support with CSS variables:
|
|
1588
|
+
|
|
1589
|
+
```bash
|
|
1590
|
+
# Generate with theme support
|
|
1591
|
+
svger-cli build --theme dark --src ./icons --out ./components
|
|
1592
|
+
```
|
|
1593
|
+
|
|
1594
|
+
**Theme Configuration:**
|
|
1595
|
+
|
|
1596
|
+
```json
|
|
1597
|
+
{
|
|
1598
|
+
"theme": {
|
|
1599
|
+
"mode": "dark",
|
|
1600
|
+
"variables": {
|
|
1601
|
+
"primary": "#ffffff",
|
|
1602
|
+
"secondary": "#94a3b8",
|
|
1603
|
+
"accent": "#3b82f6"
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
```
|
|
1608
|
+
|
|
1609
|
+
**Generated CSS Variables:**
|
|
1610
|
+
|
|
1611
|
+
```css
|
|
1612
|
+
:root {
|
|
1613
|
+
--icon-primary: #ffffff;
|
|
1614
|
+
--icon-secondary: #94a3b8;
|
|
1615
|
+
--icon-accent: #3b82f6;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
.icon {
|
|
1619
|
+
fill: var(--icon-primary);
|
|
1620
|
+
stroke: var(--icon-secondary);
|
|
1621
|
+
}
|
|
1622
|
+
```
|
|
1623
|
+
|
|
1624
|
+
### **Animation System**
|
|
1625
|
+
|
|
1626
|
+
Built-in animation utilities:
|
|
1627
|
+
|
|
1628
|
+
```bash
|
|
1629
|
+
# Generate with animations
|
|
1630
|
+
svger-cli build --animations hover,focus --src ./icons --out ./components
|
|
1631
|
+
```
|
|
1632
|
+
|
|
1633
|
+
**Available Animations:**
|
|
1634
|
+
|
|
1635
|
+
- `hover` - Hover state transitions
|
|
1636
|
+
- `focus` - Focus state transitions
|
|
1637
|
+
- `spin` - Continuous rotation
|
|
1638
|
+
- `pulse` - Pulsing opacity
|
|
1639
|
+
- `bounce` - Bouncing effect
|
|
1640
|
+
- `scale` - Scale on interaction
|
|
1641
|
+
|
|
1642
|
+
---
|
|
1643
|
+
|
|
1644
|
+
## 💻 **Programmatic API**
|
|
1645
|
+
|
|
1646
|
+
### **📡 API Modules Overview**
|
|
1647
|
+
|
|
1648
|
+
| Module | Purpose | Use Case |
|
|
1649
|
+
| ------------------- | ------------------------ | ----------------------- |
|
|
1650
|
+
| `SVGER` | Main entry point | General operations |
|
|
1651
|
+
| `svgProcessor` | SVG file processing | Custom processing |
|
|
1652
|
+
| `performanceEngine` | Performance optimization | Batch operations |
|
|
1653
|
+
| `styleCompiler` | CSS generation | Styling |
|
|
1654
|
+
| `pluginManager` | Plugin system | Extending functionality |
|
|
1655
|
+
|
|
1656
|
+
---
|
|
1657
|
+
|
|
1658
|
+
### **🔌 Core API Usage**
|
|
1659
|
+
|
|
1660
|
+
```typescript
|
|
1661
|
+
import { SVGER, svgProcessor, frameworkTemplateEngine } from 'svger-cli';
|
|
1662
|
+
|
|
1663
|
+
// Quick processing
|
|
1664
|
+
await SVGER.processFile('./icon.svg', './components/');
|
|
1665
|
+
await SVGER.processBatch(files, { parallel: true, batchSize: 20 });
|
|
1666
|
+
|
|
1667
|
+
// Framework-specific generation
|
|
1668
|
+
await SVGER.generateFrameworkComponent('IconName', svgContent, {
|
|
1669
|
+
framework: 'vue',
|
|
1670
|
+
composition: true,
|
|
1671
|
+
typescript: true,
|
|
1672
|
+
});
|
|
1673
|
+
|
|
1674
|
+
// Advanced processing
|
|
1675
|
+
const result = await svgProcessor.processSVGFile('./icon.svg', './components/', {
|
|
1676
|
+
framework: 'react',
|
|
1677
|
+
typescript: true,
|
|
1678
|
+
forwardRef: true,
|
|
1679
|
+
responsive: true,
|
|
1680
|
+
theme: 'dark',
|
|
1681
|
+
});
|
|
1682
|
+
```
|
|
1683
|
+
|
|
1684
|
+
### **⚡ Performance Engine API**
|
|
1685
|
+
|
|
1686
|
+
```typescript
|
|
1687
|
+
import { performanceEngine } from 'svger-cli';
|
|
1688
|
+
|
|
1689
|
+
// Batch processing with performance optimization
|
|
1690
|
+
const results = await performanceEngine.processBatch(files, {
|
|
1691
|
+
batchSize: 15,
|
|
1692
|
+
parallel: true,
|
|
1693
|
+
maxConcurrency: 6,
|
|
1694
|
+
});
|
|
1695
|
+
|
|
1696
|
+
// Memory monitoring
|
|
1697
|
+
const metrics = performanceEngine.monitorMemoryUsage();
|
|
1698
|
+
console.log(`Memory usage: ${metrics.heapUsed}MB`);
|
|
1699
|
+
console.log(`Recommendations:`, metrics.recommendations);
|
|
1700
|
+
|
|
1701
|
+
// SVG optimization
|
|
1702
|
+
const optimized = performanceEngine.optimizeSVGContent(svgContent, 'maximum');
|
|
1703
|
+
```
|
|
1704
|
+
|
|
1705
|
+
### **🎨 Style Compiler API**
|
|
1706
|
+
|
|
1707
|
+
```typescript
|
|
1708
|
+
import { styleCompiler } from 'svger-cli';
|
|
1709
|
+
|
|
1710
|
+
// Compile responsive styles
|
|
1711
|
+
const styles = styleCompiler.compileStyles({
|
|
1712
|
+
responsive: {
|
|
1713
|
+
width: ['20px', '24px', '32px'],
|
|
1714
|
+
height: ['20px', '24px', '32px'],
|
|
1715
|
+
},
|
|
1716
|
+
theme: 'dark',
|
|
1717
|
+
animations: ['hover', 'focus'],
|
|
1718
|
+
});
|
|
1719
|
+
|
|
1720
|
+
// Generate CSS
|
|
1721
|
+
const css = styleCompiler.generateCSS(styles);
|
|
1722
|
+
```
|
|
1723
|
+
|
|
1724
|
+
### **🔧 Plugin System API**
|
|
1725
|
+
|
|
1726
|
+
```typescript
|
|
1727
|
+
import { pluginManager } from 'svger-cli';
|
|
1728
|
+
|
|
1729
|
+
// Register custom plugin
|
|
1730
|
+
pluginManager.registerPlugin({
|
|
1731
|
+
name: 'custom-optimizer',
|
|
1732
|
+
version: '1.0.0',
|
|
1733
|
+
process: async (content: string, options?: any) => {
|
|
1734
|
+
// Custom SVG processing logic
|
|
1735
|
+
return processedContent;
|
|
1736
|
+
},
|
|
1737
|
+
validate: (options?: any) => true,
|
|
1738
|
+
});
|
|
1739
|
+
|
|
1740
|
+
// Enable plugin
|
|
1741
|
+
pluginManager.enablePlugin('custom-optimizer', { level: 'maximum' });
|
|
1742
|
+
|
|
1743
|
+
// Process with plugins
|
|
1744
|
+
const processed = await pluginManager.processContent(svgContent, [
|
|
1745
|
+
{ name: 'svg-optimizer', options: { level: 'balanced' } },
|
|
1746
|
+
{ name: 'custom-optimizer', options: { level: 'maximum' } },
|
|
1747
|
+
]);
|
|
1748
|
+
```
|
|
1749
|
+
|
|
1750
|
+
---
|
|
1751
|
+
|
|
1752
|
+
## 🔧 **Configuration Reference**
|
|
1753
|
+
|
|
1754
|
+
### **📝 Configuration Sections Quick Links**
|
|
1755
|
+
|
|
1756
|
+
| Section | Options | Purpose |
|
|
1757
|
+
| ------------------------------------------------- | ------------------------------- | ------------------ |
|
|
1758
|
+
| [Source & Output](#complete-configuration-schema) | `source`, `output` | Paths |
|
|
1759
|
+
| [Framework](#complete-configuration-schema) | `framework`, `typescript` | Framework choice |
|
|
1760
|
+
| [Processing](#complete-configuration-schema) | `parallel`, `batchSize` | Performance |
|
|
1761
|
+
| [Defaults](#complete-configuration-schema) | `defaultWidth`, `defaultHeight` | Defaults |
|
|
1762
|
+
| [Styling](#complete-configuration-schema) | `styleRules`, `responsive` | Styling |
|
|
1763
|
+
| [Theme](#complete-configuration-schema) | `theme`, `variables` | Theme system |
|
|
1764
|
+
| [Error Handling](#complete-configuration-schema) | `strategy`, `maxRetries` | Error handling |
|
|
1765
|
+
| [Performance](#complete-configuration-schema) | `optimization`, `memoryLimit` | Performance tuning |
|
|
1766
|
+
| [Output](#complete-configuration-schema) | `naming`, `extension` | Output format |
|
|
1767
|
+
| [Framework-Specific](#framework-specific-options) | `react`, `vue`, `angular` | Framework options |
|
|
1768
|
+
|
|
1769
|
+
---
|
|
1770
|
+
|
|
1771
|
+
### **Complete Configuration Schema**
|
|
1772
|
+
|
|
1773
|
+
All configuration options are now fully implemented and tested:
|
|
1774
|
+
|
|
1775
|
+
```typescript
|
|
1776
|
+
interface SVGConfig {
|
|
1777
|
+
// Source & Output
|
|
1778
|
+
source: string; // Input directory path
|
|
1779
|
+
output: string; // Output directory path
|
|
1780
|
+
|
|
1781
|
+
// Framework Configuration
|
|
1782
|
+
framework: FrameworkType; // Target framework
|
|
1783
|
+
typescript: boolean; // Generate TypeScript
|
|
1784
|
+
componentType: ComponentType; // Component pattern
|
|
1785
|
+
|
|
1786
|
+
// Processing Options
|
|
1787
|
+
watch: boolean; // Enable file watching
|
|
1788
|
+
parallel: boolean; // Enable parallel processing
|
|
1789
|
+
batchSize: number; // Batch processing size
|
|
1790
|
+
maxConcurrency: number; // Maximum concurrent processes
|
|
1791
|
+
cache: boolean; // Enable processing cache
|
|
1792
|
+
|
|
1793
|
+
// Default Properties
|
|
1794
|
+
defaultWidth: number; // Default SVG width
|
|
1795
|
+
defaultHeight: number; // Default SVG height
|
|
1796
|
+
defaultFill: string; // Default fill color
|
|
1797
|
+
defaultStroke: string; // Default stroke color
|
|
1798
|
+
defaultStrokeWidth: number; // Default stroke width
|
|
1799
|
+
|
|
1800
|
+
// Styling Configuration
|
|
1801
|
+
styleRules: {
|
|
1802
|
+
// CSS styling rules
|
|
1803
|
+
[property: string]: string;
|
|
1804
|
+
};
|
|
1805
|
+
|
|
1806
|
+
responsive: {
|
|
1807
|
+
// Responsive design
|
|
1808
|
+
breakpoints: string[];
|
|
1809
|
+
values: {
|
|
1810
|
+
[property: string]: string[];
|
|
1811
|
+
};
|
|
1812
|
+
};
|
|
1813
|
+
|
|
1814
|
+
theme: {
|
|
1815
|
+
// Theme configuration
|
|
1816
|
+
mode: 'light' | 'dark' | 'auto';
|
|
1817
|
+
variables: {
|
|
1818
|
+
[name: string]: string;
|
|
1819
|
+
};
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
animations: string[]; // Animation effects
|
|
1823
|
+
|
|
1824
|
+
// Advanced Options
|
|
1825
|
+
plugins: PluginConfig[]; // Plugin configurations
|
|
1826
|
+
exclude: string[]; // Files to exclude
|
|
1827
|
+
include: string[]; // Files to include (overrides exclude)
|
|
1828
|
+
|
|
1829
|
+
// Error Handling
|
|
1830
|
+
errorHandling: {
|
|
1831
|
+
strategy: 'continue' | 'stop' | 'retry';
|
|
1832
|
+
maxRetries: number;
|
|
1833
|
+
timeout: number;
|
|
1834
|
+
};
|
|
1835
|
+
|
|
1836
|
+
// Performance Settings
|
|
1837
|
+
performance: {
|
|
1838
|
+
optimization: 'fast' | 'balanced' | 'maximum';
|
|
1839
|
+
memoryLimit: number; // Memory limit in MB
|
|
1840
|
+
cacheTimeout: number; // Cache timeout in ms
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1843
|
+
// Output Customization
|
|
1844
|
+
outputConfig: {
|
|
1845
|
+
naming: 'kebab' | 'pascal' | 'camel';
|
|
1846
|
+
extension: string; // File extension override
|
|
1847
|
+
directory: string; // Output directory structure
|
|
1848
|
+
};
|
|
1849
|
+
|
|
1850
|
+
// Framework-specific configurations
|
|
1851
|
+
react?: ReactConfig;
|
|
1852
|
+
vue?: VueConfig;
|
|
1853
|
+
angular?: AngularConfig;
|
|
1854
|
+
}
|
|
1855
|
+
```
|
|
1856
|
+
|
|
1857
|
+
**✅ All 28 configuration properties are fully implemented and tested**
|
|
1858
|
+
|
|
1859
|
+
### **Configuration Validation**
|
|
1860
|
+
|
|
1861
|
+
SVGER-CLI includes comprehensive configuration validation to ensure all settings are correct:
|
|
1862
|
+
|
|
1863
|
+
```bash
|
|
1864
|
+
# Validate current configuration
|
|
1865
|
+
svger-cli config --validate
|
|
1866
|
+
|
|
1867
|
+
# Show detailed configuration analysis
|
|
1868
|
+
svger-cli config --show
|
|
1869
|
+
|
|
1870
|
+
# Test configuration with sample files
|
|
1871
|
+
svger-cli build --dry-run --src ./test-svg --out ./test-output
|
|
1872
|
+
```
|
|
1873
|
+
|
|
1874
|
+
**Validation Features:**
|
|
1875
|
+
|
|
1876
|
+
- ✅ **Type Safety**: All configuration options are type-checked
|
|
1877
|
+
- ✅ **Framework Compatibility**: Validates framework-specific options
|
|
1878
|
+
- ✅ **Performance Settings**: Ensures optimal performance configuration
|
|
1879
|
+
- ✅ **Path Validation**: Verifies source and output directories
|
|
1880
|
+
- ✅ **Plugin Validation**: Checks plugin compatibility and options
|
|
1881
|
+
|
|
1882
|
+
### **Example Configuration Files**
|
|
1883
|
+
|
|
1884
|
+
A comprehensive example configuration is included with detailed explanations:
|
|
1885
|
+
|
|
1886
|
+
```bash
|
|
1887
|
+
# Copy example configuration
|
|
1888
|
+
cp .svgerconfig.example.json .svgerconfig.json
|
|
1889
|
+
|
|
1890
|
+
# Initialize with interactive setup
|
|
1891
|
+
svger-cli init --interactive
|
|
1892
|
+
```
|
|
1893
|
+
|
|
1894
|
+
The example file includes all 28 configuration options with documentation and examples for React,
|
|
1895
|
+
Vue, Angular, and other frameworks.
|
|
1896
|
+
|
|
1897
|
+
### **Framework-Specific Options**
|
|
1898
|
+
|
|
1899
|
+
#### **React Configuration**
|
|
1900
|
+
|
|
1901
|
+
```json
|
|
1902
|
+
{
|
|
1903
|
+
"framework": "react",
|
|
1904
|
+
"react": {
|
|
1905
|
+
"componentType": "functional",
|
|
1906
|
+
"forwardRef": true,
|
|
1907
|
+
"memo": false,
|
|
1908
|
+
"propsInterface": "SVGProps",
|
|
1909
|
+
"styledComponents": true,
|
|
1910
|
+
"cssModules": false
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
```
|
|
1914
|
+
|
|
1915
|
+
#### **Vue Configuration**
|
|
1916
|
+
|
|
1917
|
+
```json
|
|
1918
|
+
{
|
|
1919
|
+
"framework": "vue",
|
|
1920
|
+
"vue": {
|
|
1921
|
+
"api": "composition",
|
|
1922
|
+
"setup": true,
|
|
1923
|
+
"typescript": true,
|
|
1924
|
+
"scoped": true,
|
|
1925
|
+
"cssVariables": true
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
```
|
|
1929
|
+
|
|
1930
|
+
#### **Angular Configuration**
|
|
1931
|
+
|
|
1932
|
+
```json
|
|
1933
|
+
{
|
|
1934
|
+
"framework": "angular",
|
|
1935
|
+
"angular": {
|
|
1936
|
+
"standalone": true,
|
|
1937
|
+
"signals": true,
|
|
1938
|
+
"changeDetection": "OnPush",
|
|
1939
|
+
"encapsulation": "Emulated"
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
```
|
|
1943
|
+
|
|
1944
|
+
---
|
|
1945
|
+
|
|
1946
|
+
## 📊 **Performance Optimization**
|
|
1947
|
+
|
|
1948
|
+
### **Benchmarks vs Competitors**
|
|
1949
|
+
|
|
1950
|
+
| **Operation** | **SVGER v2.0** | **SVGR** | **Improvement** |
|
|
1951
|
+
| ----------------------- | -------------- | -------- | --------------- |
|
|
1952
|
+
| Single file (100KB SVG) | 15ms | 25ms | **40% faster** |
|
|
1953
|
+
| Batch (100 files) | 850ms | 1,450ms | **70% faster** |
|
|
1954
|
+
| Memory (1000 files) | 45MB | 120MB | **62% less** |
|
|
1955
|
+
| Bundle size | 2.1MB | 18.7MB | **89% smaller** |
|
|
1956
|
+
| Startup time | 120ms | 340ms | **65% faster** |
|
|
1957
|
+
|
|
1958
|
+
### **Performance Best Practices**
|
|
1959
|
+
|
|
1960
|
+
#### **Batch Processing Optimization**
|
|
1961
|
+
|
|
1962
|
+
```bash
|
|
1963
|
+
# Optimal batch processing
|
|
1964
|
+
svger-cli build \
|
|
1965
|
+
--src ./icons \
|
|
1966
|
+
--out ./components \
|
|
1967
|
+
--parallel \
|
|
1968
|
+
--batch-size 15 \
|
|
1969
|
+
--max-concurrency 4 \
|
|
1970
|
+
--cache \
|
|
1971
|
+
--performance
|
|
1972
|
+
```
|
|
1973
|
+
|
|
1974
|
+
#### **Memory Management**
|
|
1975
|
+
|
|
1976
|
+
```typescript
|
|
1977
|
+
// Monitor memory usage
|
|
1978
|
+
import { performanceEngine } from 'svger-cli';
|
|
1979
|
+
|
|
1980
|
+
const monitor = setInterval(() => {
|
|
1981
|
+
const usage = performanceEngine.monitorMemoryUsage();
|
|
1982
|
+
if (usage.heapUsed > 500) {
|
|
1983
|
+
console.warn('High memory usage detected');
|
|
1984
|
+
performanceEngine.clearCache();
|
|
1985
|
+
}
|
|
1986
|
+
}, 5000);
|
|
1987
|
+
```
|
|
1988
|
+
|
|
1989
|
+
#### **Cache Configuration**
|
|
1990
|
+
|
|
1991
|
+
```json
|
|
1992
|
+
{
|
|
1993
|
+
"performance": {
|
|
1994
|
+
"cache": true,
|
|
1995
|
+
"cacheTimeout": 300000,
|
|
1996
|
+
"memoryLimit": 512
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
```
|
|
2000
|
+
|
|
2001
|
+
---
|
|
2002
|
+
|
|
2003
|
+
## 🧪 **Testing & Quality Assurance**
|
|
2004
|
+
|
|
2005
|
+
### **Component Testing**
|
|
2006
|
+
|
|
2007
|
+
Generated components include comprehensive testing utilities:
|
|
2008
|
+
|
|
2009
|
+
```typescript
|
|
2010
|
+
// Generated React component test
|
|
2011
|
+
import { render, screen } from '@testing-library/react';
|
|
2012
|
+
import { IconName } from './IconName';
|
|
2013
|
+
|
|
2014
|
+
describe('IconName', () => {
|
|
2015
|
+
it('renders with default props', () => {
|
|
2016
|
+
render(<IconName />);
|
|
2017
|
+
const svg = screen.getByRole('img', { hidden: true });
|
|
2018
|
+
expect(svg).toBeInTheDocument();
|
|
2019
|
+
});
|
|
2020
|
+
|
|
2021
|
+
it('accepts custom props', () => {
|
|
2022
|
+
render(<IconName width={32} height={32} fill="red" />);
|
|
2023
|
+
const svg = screen.getByRole('img', { hidden: true });
|
|
2024
|
+
expect(svg).toHaveAttribute('width', '32');
|
|
2025
|
+
expect(svg).toHaveAttribute('height', '32');
|
|
2026
|
+
expect(svg).toHaveAttribute('fill', 'red');
|
|
2027
|
+
});
|
|
2028
|
+
});
|
|
2029
|
+
```
|
|
2030
|
+
|
|
2031
|
+
### **Integration Testing**
|
|
2032
|
+
|
|
2033
|
+
```bash
|
|
2034
|
+
# Run integration tests
|
|
2035
|
+
npm run test:integration
|
|
2036
|
+
|
|
2037
|
+
# Test specific framework
|
|
2038
|
+
npm run test:framework:react
|
|
2039
|
+
npm run test:framework:vue
|
|
2040
|
+
npm run test:framework:angular
|
|
2041
|
+
```
|
|
2042
|
+
|
|
2043
|
+
### **Performance Testing**
|
|
2044
|
+
|
|
2045
|
+
```bash
|
|
2046
|
+
# Run performance benchmarks
|
|
2047
|
+
svger-cli performance --benchmark
|
|
2048
|
+
|
|
2049
|
+
# Memory leak testing
|
|
2050
|
+
svger-cli performance --memory --duration 60s
|
|
2051
|
+
|
|
2052
|
+
# Load testing
|
|
2053
|
+
svger-cli performance --load --files 1000
|
|
2054
|
+
```
|
|
2055
|
+
|
|
2056
|
+
---
|
|
2057
|
+
|
|
2058
|
+
## 🚀 **Production Deployment**
|
|
2059
|
+
|
|
2060
|
+
### **CI/CD Integration**
|
|
2061
|
+
|
|
2062
|
+
#### **GitHub Actions**
|
|
2063
|
+
|
|
2064
|
+
```yaml
|
|
2065
|
+
name: SVG Component Generation
|
|
2066
|
+
on:
|
|
2067
|
+
push:
|
|
2068
|
+
paths: ['src/assets/svg/**']
|
|
2069
|
+
|
|
2070
|
+
jobs:
|
|
2071
|
+
generate-components:
|
|
2072
|
+
runs-on: ubuntu-latest
|
|
2073
|
+
steps:
|
|
2074
|
+
- uses: actions/checkout@v3
|
|
2075
|
+
- uses: actions/setup-node@v3
|
|
2076
|
+
with:
|
|
2077
|
+
node-version: '18'
|
|
2078
|
+
|
|
2079
|
+
- name: Install SVGER-CLI
|
|
2080
|
+
run: npm install -g svger-cli@2.0.7
|
|
2081
|
+
|
|
2082
|
+
- name: Generate Components
|
|
2083
|
+
run: |
|
|
2084
|
+
svger-cli build \
|
|
2085
|
+
--src ./src/assets/svg \
|
|
2086
|
+
--out ./src/components/icons \
|
|
2087
|
+
--framework react \
|
|
2088
|
+
--typescript \
|
|
2089
|
+
--parallel \
|
|
2090
|
+
--performance
|
|
2091
|
+
|
|
2092
|
+
- name: Commit Generated Components
|
|
2093
|
+
run: |
|
|
2094
|
+
git config --local user.email "action@github.com"
|
|
2095
|
+
git config --local user.name "GitHub Action"
|
|
2096
|
+
git add src/components/icons/
|
|
2097
|
+
git commit -m "🤖 Auto-generated SVG components" || exit 0
|
|
2098
|
+
git push
|
|
2099
|
+
```
|
|
2100
|
+
|
|
2101
|
+
#### **Jenkins Pipeline**
|
|
2102
|
+
|
|
2103
|
+
```groovy
|
|
2104
|
+
pipeline {
|
|
2105
|
+
agent any
|
|
2106
|
+
|
|
2107
|
+
stages {
|
|
2108
|
+
stage('Generate SVG Components') {
|
|
2109
|
+
steps {
|
|
2110
|
+
sh '''
|
|
2111
|
+
npm install -g svger-cli@2.0.7
|
|
2112
|
+
svger-cli build \
|
|
2113
|
+
--src ./assets/svg \
|
|
2114
|
+
--out ./components \
|
|
2115
|
+
--framework vue \
|
|
2116
|
+
--composition \
|
|
2117
|
+
--typescript \
|
|
2118
|
+
--cache \
|
|
2119
|
+
--performance
|
|
2120
|
+
'''
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
```
|
|
2126
|
+
|
|
2127
|
+
### **Docker Integration**
|
|
2128
|
+
|
|
2129
|
+
```dockerfile
|
|
2130
|
+
FROM node:18-alpine
|
|
2131
|
+
|
|
2132
|
+
# Install SVGER-CLI globally
|
|
2133
|
+
RUN npm install -g svger-cli@2.0.7
|
|
2134
|
+
|
|
2135
|
+
# Set working directory
|
|
2136
|
+
WORKDIR /app
|
|
2137
|
+
|
|
2138
|
+
# Copy SVG files
|
|
2139
|
+
COPY src/assets/svg ./src/assets/svg
|
|
2140
|
+
|
|
2141
|
+
# Generate components
|
|
2142
|
+
RUN svger-cli build \
|
|
2143
|
+
--src ./src/assets/svg \
|
|
2144
|
+
--out ./src/components/icons \
|
|
2145
|
+
--framework react \
|
|
2146
|
+
--typescript \
|
|
2147
|
+
--parallel
|
|
2148
|
+
|
|
2149
|
+
# Copy generated components
|
|
2150
|
+
COPY src/components ./src/components
|
|
2151
|
+
```
|
|
2152
|
+
|
|
2153
|
+
---
|
|
2154
|
+
|
|
2155
|
+
## 🔌 **Plugin Development**
|
|
2156
|
+
|
|
2157
|
+
### **Creating Custom Plugins**
|
|
2158
|
+
|
|
2159
|
+
```typescript
|
|
2160
|
+
import { Plugin } from 'svger-cli';
|
|
2161
|
+
|
|
2162
|
+
const customOptimizer: Plugin = {
|
|
2163
|
+
name: 'custom-svg-optimizer',
|
|
2164
|
+
version: '1.0.0',
|
|
2165
|
+
|
|
2166
|
+
process: async (content: string, options?: any) => {
|
|
2167
|
+
// Custom SVG processing logic
|
|
2168
|
+
const optimized = content
|
|
2169
|
+
.replace(/fill="none"/g, '')
|
|
2170
|
+
.replace(/stroke="currentColor"/g, 'stroke="inherit"');
|
|
2171
|
+
|
|
2172
|
+
return optimized;
|
|
2173
|
+
},
|
|
2174
|
+
|
|
2175
|
+
validate: (options?: any) => {
|
|
2176
|
+
return options && typeof options.level === 'string';
|
|
2177
|
+
},
|
|
2178
|
+
};
|
|
2179
|
+
|
|
2180
|
+
// Register plugin
|
|
2181
|
+
import { pluginManager } from 'svger-cli';
|
|
2182
|
+
pluginManager.registerPlugin(customOptimizer);
|
|
2183
|
+
```
|
|
2184
|
+
|
|
2185
|
+
### **Plugin Configuration**
|
|
2186
|
+
|
|
2187
|
+
```json
|
|
2188
|
+
{
|
|
2189
|
+
"plugins": [
|
|
2190
|
+
{
|
|
2191
|
+
"name": "svg-optimizer",
|
|
2192
|
+
"options": {
|
|
2193
|
+
"level": "balanced"
|
|
2194
|
+
}
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
"name": "custom-svg-optimizer",
|
|
2198
|
+
"options": {
|
|
2199
|
+
"level": "maximum"
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
]
|
|
2203
|
+
}
|
|
2204
|
+
```
|
|
2205
|
+
|
|
2206
|
+
---
|
|
2207
|
+
|
|
2208
|
+
## 🔍 **Troubleshooting & FAQ**
|
|
2209
|
+
|
|
2210
|
+
### **Common Issues**
|
|
2211
|
+
|
|
2212
|
+
#### **Memory Issues**
|
|
2213
|
+
|
|
2214
|
+
```bash
|
|
2215
|
+
# If experiencing memory issues with large batches
|
|
2216
|
+
svger-cli build \
|
|
2217
|
+
--batch-size 5 \
|
|
2218
|
+
--max-concurrency 2 \
|
|
2219
|
+
--src ./icons \
|
|
2220
|
+
--out ./components
|
|
2221
|
+
```
|
|
2222
|
+
|
|
2223
|
+
#### **Performance Issues**
|
|
2224
|
+
|
|
2225
|
+
```bash
|
|
2226
|
+
# Enable performance monitoring
|
|
2227
|
+
svger-cli performance --analyze
|
|
2228
|
+
|
|
2229
|
+
# Clear cache if needed
|
|
2230
|
+
svger-cli clean --cache
|
|
2231
|
+
|
|
2232
|
+
# Optimize configuration
|
|
2233
|
+
svger-cli performance --optimize
|
|
2234
|
+
```
|
|
2235
|
+
|
|
2236
|
+
#### **TypeScript Errors**
|
|
2237
|
+
|
|
2238
|
+
```bash
|
|
2239
|
+
# Validate configuration
|
|
2240
|
+
svger-cli config --validate
|
|
2241
|
+
|
|
2242
|
+
# Regenerate with strict TypeScript
|
|
2243
|
+
svger-cli build --typescript --strict
|
|
2244
|
+
```
|
|
2245
|
+
|
|
2246
|
+
### **Debugging**
|
|
2247
|
+
|
|
2248
|
+
```bash
|
|
2249
|
+
# Enable verbose logging
|
|
2250
|
+
svger-cli build --verbose --src ./icons --out ./components
|
|
2251
|
+
|
|
2252
|
+
# Debug specific framework
|
|
2253
|
+
svger-cli build --framework vue --debug
|
|
2254
|
+
|
|
2255
|
+
# Performance debugging
|
|
2256
|
+
svger-cli build --performance --memory
|
|
2257
|
+
```
|
|
2258
|
+
|
|
2259
|
+
---
|
|
2260
|
+
|
|
2261
|
+
## 📚 **Migration Guide**
|
|
2262
|
+
|
|
2263
|
+
### **From SVGR**
|
|
2264
|
+
|
|
2265
|
+
```bash
|
|
2266
|
+
# Install SVGER-CLI
|
|
2267
|
+
npm uninstall @svgr/webpack @svgr/cli
|
|
2268
|
+
npm install -g svger-cli@2.0.7
|
|
2269
|
+
|
|
2270
|
+
# Migrate configuration
|
|
2271
|
+
svger-cli init --framework react --typescript
|
|
2272
|
+
|
|
2273
|
+
# Build components
|
|
2274
|
+
svger-cli build --src ./assets --out ./components
|
|
2275
|
+
```
|
|
2276
|
+
|
|
2277
|
+
### **From v1.x**
|
|
2278
|
+
|
|
2279
|
+
```bash
|
|
2280
|
+
# Upgrade to v2.0
|
|
2281
|
+
npm install -g svger-cli@2.0.7
|
|
2282
|
+
|
|
2283
|
+
# Migrate configuration
|
|
2284
|
+
svger-cli config --migrate
|
|
2285
|
+
|
|
2286
|
+
# Rebuild with new features
|
|
2287
|
+
svger-cli build --framework react --responsive --theme dark
|
|
2288
|
+
```
|
|
2289
|
+
|
|
2290
|
+
---
|
|
2291
|
+
|
|
2292
|
+
## 🤝 **Contributing & Support**
|
|
2293
|
+
|
|
2294
|
+
### **Contributing**
|
|
2295
|
+
|
|
2296
|
+
1. Fork the repository
|
|
2297
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
2298
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
2299
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
2300
|
+
5. Open a Pull Request
|
|
2301
|
+
|
|
2302
|
+
### **Support**
|
|
2303
|
+
|
|
2304
|
+
- 📧 **Email**: navidrezadoost07@gmail.com
|
|
2305
|
+
- 🐛 **Issues**: [GitHub Issues](https://github.com/faezemohades/svger-cli/issues)
|
|
2306
|
+
- 📖 **Documentation**: [docs.svger-cli.com](https://docs.svger-cli.com)
|
|
2307
|
+
|
|
2308
|
+
---
|
|
2309
|
+
|
|
2310
|
+
## 📄 **License & Acknowledgements**
|
|
2311
|
+
|
|
2312
|
+
### **License**
|
|
2313
|
+
|
|
2314
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
2315
|
+
|
|
2316
|
+
### **Acknowledgements**
|
|
2317
|
+
|
|
2318
|
+
This project was developed through the collaborative efforts of:
|
|
2319
|
+
|
|
2320
|
+
- **🏗️ Architecture Design**: [ADR-001](./docs/ADR-SVG-INTRGRATION-METHODS-001.adr.md) authored by
|
|
2321
|
+
**Engineer Navid Rezadoost**
|
|
2322
|
+
- **📋 Technical Requirements**:
|
|
2323
|
+
[TDR-001](https://docs.google.com/document/d/1b04_V01xOvLiSMzuPdaRynANlnt2wYdJ_vjs9MAqtn4/edit?tab=t.0)
|
|
2324
|
+
prepared by **Ehsan Jafari**
|
|
2325
|
+
- **💻 Implementation**: **Navid Rezadoost** - Faeze Mohades Lead developer and package maintainer
|
|
2326
|
+
- **🏢 Enterprise Architecture**: SVGER Development Team
|
|
2327
|
+
|
|
2328
|
+
Their guidance and documentation on SVG integration methods in React, Vue, and other frameworks were
|
|
2329
|
+
instrumental in shaping the design and functionality of the SVGER-CLI v2.0.
|
|
2330
|
+
|
|
2331
|
+
### **Special Thanks**
|
|
2332
|
+
|
|
2333
|
+
- The open-source community for inspiration and feedback
|
|
2334
|
+
- Framework maintainers for excellent documentation
|
|
2335
|
+
- Beta testers who provided valuable insights
|
|
2336
|
+
- Enterprise customers who drove advanced feature requirements
|
|
2337
|
+
|
|
2338
|
+
---
|
|
2339
|
+
|
|
2340
|
+
**© 2025 SVGER-CLI Development Team. Built with ❤️ for the developer community.**
|