@iconify/json 2.0.0-beta.1 → 2.0.0
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/collections.json +64 -21
- package/collections.md +38 -30
- package/composer.json +13 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +32 -0
- package/dist/index.mjs +32 -0
- package/json/akar-icons.json +28 -13
- package/json/bi.json +116 -113
- package/json/carbon.json +244 -12
- package/json/codicon.json +6 -3
- package/json/fluent.json +2328 -99
- package/json/gala.json +181 -0
- package/json/grommet-icons.json +1 -1
- package/json/ic.json +1106 -6
- package/json/ion.json +2 -2
- package/json/lucide.json +24 -3
- package/json/mdi.json +272 -41
- package/json/mono-icons.json +2 -1
- package/json/prime.json +742 -0
- package/json/simple-icons.json +118 -7
- package/json/tabler.json +184 -13
- package/package.json +8 -5
- package/readme.md +179 -54
package/collections.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mdi": {
|
|
3
3
|
"name": "Material Design Icons",
|
|
4
|
-
"total":
|
|
4
|
+
"total": 6628,
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Austin Andrews",
|
|
7
7
|
"url": "https://github.com/Templarian/MaterialDesign"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"ic": {
|
|
45
45
|
"name": "Google Material Icons",
|
|
46
|
-
"total":
|
|
46
|
+
"total": 10285,
|
|
47
47
|
"author": {
|
|
48
48
|
"name": "Material Design Authors",
|
|
49
49
|
"url": "https://github.com/cyberalien/google-material-design-icons-updated"
|
|
@@ -257,14 +257,14 @@
|
|
|
257
257
|
"ion": {
|
|
258
258
|
"name": "IonIcons",
|
|
259
259
|
"total": 1332,
|
|
260
|
-
"version": "
|
|
260
|
+
"version": "6.0.0",
|
|
261
261
|
"author": {
|
|
262
262
|
"name": "Ben Sperry",
|
|
263
263
|
"url": "https://github.com/ionic-team/ionicons"
|
|
264
264
|
},
|
|
265
265
|
"license": {
|
|
266
266
|
"title": "MIT",
|
|
267
|
-
"url": "https://github.com/ionic-team/ionicons/blob/
|
|
267
|
+
"url": "https://github.com/ionic-team/ionicons/blob/main/LICENSE"
|
|
268
268
|
},
|
|
269
269
|
"samples": [
|
|
270
270
|
"ios-add-circle-outline",
|
|
@@ -278,8 +278,8 @@
|
|
|
278
278
|
},
|
|
279
279
|
"bi": {
|
|
280
280
|
"name": "Bootstrap Icons",
|
|
281
|
-
"total":
|
|
282
|
-
"version": "1.7.
|
|
281
|
+
"total": 1522,
|
|
282
|
+
"version": "1.7.1",
|
|
283
283
|
"author": {
|
|
284
284
|
"name": "The Bootstrap Authors",
|
|
285
285
|
"url": "https://github.com/twbs/icons"
|
|
@@ -320,8 +320,8 @@
|
|
|
320
320
|
},
|
|
321
321
|
"carbon": {
|
|
322
322
|
"name": "Carbon",
|
|
323
|
-
"total":
|
|
324
|
-
"version": "10.
|
|
323
|
+
"total": 1898,
|
|
324
|
+
"version": "10.43.0",
|
|
325
325
|
"author": {
|
|
326
326
|
"name": "IBM",
|
|
327
327
|
"url": "https://github.com/carbon-design-system/carbon/tree/main/packages/icons"
|
|
@@ -384,8 +384,8 @@
|
|
|
384
384
|
},
|
|
385
385
|
"tabler": {
|
|
386
386
|
"name": "Tabler Icons",
|
|
387
|
-
"total":
|
|
388
|
-
"version": "1.
|
|
387
|
+
"total": 1354,
|
|
388
|
+
"version": "1.44.0",
|
|
389
389
|
"author": {
|
|
390
390
|
"name": "Paweł Kuna",
|
|
391
391
|
"url": "https://github.com/tabler/tabler-icons"
|
|
@@ -734,8 +734,8 @@
|
|
|
734
734
|
},
|
|
735
735
|
"codicon": {
|
|
736
736
|
"name": "Codicons",
|
|
737
|
-
"total":
|
|
738
|
-
"version": "0.0.
|
|
737
|
+
"total": 387,
|
|
738
|
+
"version": "0.0.26",
|
|
739
739
|
"author": {
|
|
740
740
|
"name": "Microsoft Corporation",
|
|
741
741
|
"url": "https://github.com/microsoft/vscode-codicons"
|
|
@@ -779,7 +779,7 @@
|
|
|
779
779
|
},
|
|
780
780
|
"lucide": {
|
|
781
781
|
"name": "Lucide",
|
|
782
|
-
"total":
|
|
782
|
+
"total": 514,
|
|
783
783
|
"author": {
|
|
784
784
|
"name": "Lucide Contributors",
|
|
785
785
|
"url": "https://github.com/lucide-icons/lucide"
|
|
@@ -840,6 +840,27 @@
|
|
|
840
840
|
"category": "General",
|
|
841
841
|
"palette": false
|
|
842
842
|
},
|
|
843
|
+
"prime": {
|
|
844
|
+
"name": "Prime Icons",
|
|
845
|
+
"total": 238,
|
|
846
|
+
"author": {
|
|
847
|
+
"name": "PrimeTek",
|
|
848
|
+
"url": "https://github.com/primefaces/primeicons"
|
|
849
|
+
},
|
|
850
|
+
"license": {
|
|
851
|
+
"title": "MIT",
|
|
852
|
+
"url": "https://github.com/primefaces/primeicons/blob/master/LICENSE"
|
|
853
|
+
},
|
|
854
|
+
"samples": [
|
|
855
|
+
"book",
|
|
856
|
+
"telegram",
|
|
857
|
+
"volume-off"
|
|
858
|
+
],
|
|
859
|
+
"height": 24,
|
|
860
|
+
"displayHeight": 24,
|
|
861
|
+
"category": "General",
|
|
862
|
+
"palette": false
|
|
863
|
+
},
|
|
843
864
|
"line-md": {
|
|
844
865
|
"name": "Material Line Icons",
|
|
845
866
|
"total": 250,
|
|
@@ -885,8 +906,8 @@
|
|
|
885
906
|
},
|
|
886
907
|
"akar-icons": {
|
|
887
908
|
"name": "Akar Icons",
|
|
888
|
-
"total":
|
|
889
|
-
"version": "1.9.
|
|
909
|
+
"total": 382,
|
|
910
|
+
"version": "1.9.3",
|
|
890
911
|
"author": {
|
|
891
912
|
"name": "Arturo Wibawa",
|
|
892
913
|
"url": "https://github.com/artcoholic/akar-icons"
|
|
@@ -1034,7 +1055,8 @@
|
|
|
1034
1055
|
"height": 24,
|
|
1035
1056
|
"displayHeight": 24,
|
|
1036
1057
|
"category": "General",
|
|
1037
|
-
"palette": false
|
|
1058
|
+
"palette": false,
|
|
1059
|
+
"hidden": true
|
|
1038
1060
|
},
|
|
1039
1061
|
"heroicons-outline": {
|
|
1040
1062
|
"name": "HeroIcons Outline",
|
|
@@ -1123,6 +1145,27 @@
|
|
|
1123
1145
|
"category": "General",
|
|
1124
1146
|
"palette": false
|
|
1125
1147
|
},
|
|
1148
|
+
"gala": {
|
|
1149
|
+
"name": "Gala Icons",
|
|
1150
|
+
"total": 51,
|
|
1151
|
+
"author": {
|
|
1152
|
+
"name": "Jake Wells",
|
|
1153
|
+
"url": "https://github.com/sisyphusion/gala-icons"
|
|
1154
|
+
},
|
|
1155
|
+
"license": {
|
|
1156
|
+
"title": "GPL",
|
|
1157
|
+
"url": "https://github.com/sisyphusion/gala-icons/blob/main/LICENSE"
|
|
1158
|
+
},
|
|
1159
|
+
"samples": [
|
|
1160
|
+
"brochure",
|
|
1161
|
+
"remove",
|
|
1162
|
+
"chart"
|
|
1163
|
+
],
|
|
1164
|
+
"height": 32,
|
|
1165
|
+
"displayHeight": 16,
|
|
1166
|
+
"category": "General",
|
|
1167
|
+
"palette": false
|
|
1168
|
+
},
|
|
1126
1169
|
"ps": {
|
|
1127
1170
|
"name": "PrestaShop Icons",
|
|
1128
1171
|
"total": 479,
|
|
@@ -1377,8 +1420,8 @@
|
|
|
1377
1420
|
},
|
|
1378
1421
|
"fluent": {
|
|
1379
1422
|
"name": "Fluent UI System Icons",
|
|
1380
|
-
"total":
|
|
1381
|
-
"version": "1.1.
|
|
1423
|
+
"total": 9500,
|
|
1424
|
+
"version": "1.1.151",
|
|
1382
1425
|
"author": {
|
|
1383
1426
|
"name": "Microsoft Corporation",
|
|
1384
1427
|
"url": "https://github.com/microsoft/fluentui-system-icons"
|
|
@@ -1399,7 +1442,7 @@
|
|
|
1399
1442
|
"grommet-icons": {
|
|
1400
1443
|
"name": "Grommet Icons",
|
|
1401
1444
|
"total": 615,
|
|
1402
|
-
"version": "4.
|
|
1445
|
+
"version": "4.7.0",
|
|
1403
1446
|
"author": {
|
|
1404
1447
|
"name": "Grommet",
|
|
1405
1448
|
"url": "https://github.com/grommet/grommet-icons"
|
|
@@ -2023,8 +2066,8 @@
|
|
|
2023
2066
|
},
|
|
2024
2067
|
"simple-icons": {
|
|
2025
2068
|
"name": "Simple Icons",
|
|
2026
|
-
"total":
|
|
2027
|
-
"version": "5.
|
|
2069
|
+
"total": 2110,
|
|
2070
|
+
"version": "5.24.0",
|
|
2028
2071
|
"author": {
|
|
2029
2072
|
"name": "Simple Icons Collaborators",
|
|
2030
2073
|
"url": "https://github.com/simple-icons/simple-icons"
|
package/collections.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
### Material Design Icons
|
|
6
|
-
* Number of icons:
|
|
6
|
+
* Number of icons: 6628
|
|
7
7
|
* Author: Austin Andrews
|
|
8
8
|
* URL: https://github.com/Templarian/MaterialDesign
|
|
9
9
|
* License: Open Font License
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
### Google Material Icons
|
|
24
|
-
* Number of icons:
|
|
24
|
+
* Number of icons: 10285
|
|
25
25
|
* Author: Material Design Authors
|
|
26
26
|
* URL: https://github.com/cyberalien/google-material-design-icons-updated
|
|
27
27
|
* License: Apache 2.0
|
|
@@ -118,18 +118,18 @@
|
|
|
118
118
|
* Author: Ben Sperry
|
|
119
119
|
* URL: https://github.com/ionic-team/ionicons
|
|
120
120
|
* License: MIT
|
|
121
|
-
* License URL: https://github.com/ionic-team/ionicons/blob/
|
|
122
|
-
* Version:
|
|
121
|
+
* License URL: https://github.com/ionic-team/ionicons/blob/main/LICENSE
|
|
122
|
+
* Version: 6.0.0
|
|
123
123
|
* Palette: Colorless
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
### Bootstrap Icons
|
|
127
|
-
* Number of icons:
|
|
127
|
+
* Number of icons: 1522
|
|
128
128
|
* Author: The Bootstrap Authors
|
|
129
129
|
* URL: https://github.com/twbs/icons
|
|
130
130
|
* License: MIT
|
|
131
131
|
* License URL: https://github.com/twbs/icons/blob/master/LICENSE.md
|
|
132
|
-
* Version: 1.7.
|
|
132
|
+
* Version: 1.7.1
|
|
133
133
|
* Palette: Colorless
|
|
134
134
|
|
|
135
135
|
|
|
@@ -142,11 +142,11 @@
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
### Carbon
|
|
145
|
-
* Number of icons:
|
|
145
|
+
* Number of icons: 1898
|
|
146
146
|
* Author: IBM
|
|
147
147
|
* URL: https://github.com/carbon-design-system/carbon/tree/main/packages/icons
|
|
148
148
|
* License: Apache 2.0
|
|
149
|
-
* Version: 10.
|
|
149
|
+
* Version: 10.43.0
|
|
150
150
|
* Palette: Colorless
|
|
151
151
|
|
|
152
152
|
|
|
@@ -170,12 +170,12 @@
|
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
### Tabler Icons
|
|
173
|
-
* Number of icons:
|
|
173
|
+
* Number of icons: 1354
|
|
174
174
|
* Author: Paweł Kuna
|
|
175
175
|
* URL: https://github.com/tabler/tabler-icons
|
|
176
176
|
* License: MIT
|
|
177
177
|
* License URL: https://github.com/tabler/tabler-icons/blob/master/LICENSE
|
|
178
|
-
* Version: 1.
|
|
178
|
+
* Version: 1.44.0
|
|
179
179
|
* Palette: Colorless
|
|
180
180
|
|
|
181
181
|
|
|
@@ -326,12 +326,12 @@
|
|
|
326
326
|
|
|
327
327
|
|
|
328
328
|
### Codicons
|
|
329
|
-
* Number of icons:
|
|
329
|
+
* Number of icons: 387
|
|
330
330
|
* Author: Microsoft Corporation
|
|
331
331
|
* URL: https://github.com/microsoft/vscode-codicons
|
|
332
332
|
* License: CC BY 4.0
|
|
333
333
|
* License URL: https://raw.githubusercontent.com/microsoft/vscode-codicons/master/LICENSE
|
|
334
|
-
* Version: 0.0.
|
|
334
|
+
* Version: 0.0.26
|
|
335
335
|
* Palette: Colorless
|
|
336
336
|
|
|
337
337
|
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
|
|
345
345
|
|
|
346
346
|
### Lucide
|
|
347
|
-
* Number of icons:
|
|
347
|
+
* Number of icons: 514
|
|
348
348
|
* Author: Lucide Contributors
|
|
349
349
|
* URL: https://github.com/lucide-icons/lucide
|
|
350
350
|
* License: ISC
|
|
@@ -371,6 +371,15 @@
|
|
|
371
371
|
* Palette: Colorless
|
|
372
372
|
|
|
373
373
|
|
|
374
|
+
### Prime Icons
|
|
375
|
+
* Number of icons: 238
|
|
376
|
+
* Author: PrimeTek
|
|
377
|
+
* URL: https://github.com/primefaces/primeicons
|
|
378
|
+
* License: MIT
|
|
379
|
+
* License URL: https://github.com/primefaces/primeicons/blob/master/LICENSE
|
|
380
|
+
* Palette: Colorless
|
|
381
|
+
|
|
382
|
+
|
|
374
383
|
### Material Line Icons
|
|
375
384
|
* Number of icons: 250
|
|
376
385
|
* Author: Vjacheslav Trushkin
|
|
@@ -391,12 +400,12 @@
|
|
|
391
400
|
|
|
392
401
|
|
|
393
402
|
### Akar Icons
|
|
394
|
-
* Number of icons:
|
|
403
|
+
* Number of icons: 382
|
|
395
404
|
* Author: Arturo Wibawa
|
|
396
405
|
* URL: https://github.com/artcoholic/akar-icons
|
|
397
406
|
* License: MIT
|
|
398
407
|
* License URL: https://github.com/artcoholic/akar-icons/blob/master/LICENSE
|
|
399
|
-
* Version: 1.9.
|
|
408
|
+
* Version: 1.9.3
|
|
400
409
|
* Palette: Colorless
|
|
401
410
|
|
|
402
411
|
|
|
@@ -450,16 +459,6 @@
|
|
|
450
459
|
* Palette: Colorless
|
|
451
460
|
|
|
452
461
|
|
|
453
|
-
### Mono Icons
|
|
454
|
-
* Number of icons: 180
|
|
455
|
-
* Author: Mono
|
|
456
|
-
* URL: https://github.com/mono-company/mono-icons
|
|
457
|
-
* License: MIT
|
|
458
|
-
* License URL: https://github.com/mono-company/mono-icons/blob/master/LICENSE.md
|
|
459
|
-
* Version: 1.3.1
|
|
460
|
-
* Palette: Colorless
|
|
461
|
-
|
|
462
|
-
|
|
463
462
|
### HeroIcons Outline
|
|
464
463
|
* Number of icons: 230
|
|
465
464
|
* Author: Refactoring UI Inc
|
|
@@ -499,6 +498,15 @@
|
|
|
499
498
|
* Palette: Colorless
|
|
500
499
|
|
|
501
500
|
|
|
501
|
+
### Gala Icons
|
|
502
|
+
* Number of icons: 51
|
|
503
|
+
* Author: Jake Wells
|
|
504
|
+
* URL: https://github.com/sisyphusion/gala-icons
|
|
505
|
+
* License: GPL
|
|
506
|
+
* License URL: https://github.com/sisyphusion/gala-icons/blob/main/LICENSE
|
|
507
|
+
* Palette: Colorless
|
|
508
|
+
|
|
509
|
+
|
|
502
510
|
### PrestaShop Icons
|
|
503
511
|
* Number of icons: 479
|
|
504
512
|
* Author: PrestaShop
|
|
@@ -612,12 +620,12 @@
|
|
|
612
620
|
|
|
613
621
|
|
|
614
622
|
### Fluent UI System Icons
|
|
615
|
-
* Number of icons:
|
|
623
|
+
* Number of icons: 9500
|
|
616
624
|
* Author: Microsoft Corporation
|
|
617
625
|
* URL: https://github.com/microsoft/fluentui-system-icons
|
|
618
626
|
* License: MIT
|
|
619
627
|
* License URL: https://github.com/microsoft/fluentui-system-icons/blob/master/LICENSE
|
|
620
|
-
* Version: 1.1.
|
|
628
|
+
* Version: 1.1.151
|
|
621
629
|
* Palette: Colorless
|
|
622
630
|
|
|
623
631
|
|
|
@@ -627,7 +635,7 @@
|
|
|
627
635
|
* URL: https://github.com/grommet/grommet-icons
|
|
628
636
|
* License: Apache 2.0
|
|
629
637
|
* License URL: http://www.apache.org/licenses/LICENSE-2.0
|
|
630
|
-
* Version: 4.
|
|
638
|
+
* Version: 4.7.0
|
|
631
639
|
* Palette: Colorless
|
|
632
640
|
|
|
633
641
|
|
|
@@ -913,12 +921,12 @@
|
|
|
913
921
|
|
|
914
922
|
|
|
915
923
|
### Simple Icons
|
|
916
|
-
* Number of icons:
|
|
924
|
+
* Number of icons: 2110
|
|
917
925
|
* Author: Simple Icons Collaborators
|
|
918
926
|
* URL: https://github.com/simple-icons/simple-icons
|
|
919
927
|
* License: CC0 1.0
|
|
920
928
|
* License URL: https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md
|
|
921
|
-
* Version: 5.
|
|
929
|
+
* Version: 5.24.0
|
|
922
930
|
* Palette: Colorless
|
|
923
931
|
|
|
924
932
|
|
package/composer.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "iconify/json",
|
|
3
|
+
"description": "Iconify icons collection in JSON format",
|
|
4
|
+
"type": "library",
|
|
5
|
+
"version": "2.0.0",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://iconify.design/icon-sets/",
|
|
8
|
+
"autoload": {
|
|
9
|
+
"psr-4": {
|
|
10
|
+
"Iconify\\IconsJSON\\": "lib"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PathLike } from 'fs';
|
|
2
|
+
import { IconifyInfo, IconifyJSON } from '@iconify/types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This file is part of the iconify.design libraries.
|
|
6
|
+
*
|
|
7
|
+
* (c) Vjacheslav Trushkin <cyberalien@gmail.com>
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*
|
|
11
|
+
* For the full copyright and license information, please view the license.txt
|
|
12
|
+
* file that is available in this file's directory.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Collection info map
|
|
17
|
+
*/
|
|
18
|
+
declare type IconifyMetaDataCollection = {
|
|
19
|
+
[prefix: string]: IconifyInfo;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Locate JSON file
|
|
23
|
+
*
|
|
24
|
+
* @param {string} name Collection name
|
|
25
|
+
* @returns {string} Path to collection json file
|
|
26
|
+
*/
|
|
27
|
+
declare const locate: (name: string) => PathLike;
|
|
28
|
+
/**
|
|
29
|
+
* Loads a collection.
|
|
30
|
+
*
|
|
31
|
+
* @param {PathLike} path The path to locate the `json` collection file.
|
|
32
|
+
* @return {Promise<IconifyJSON>}
|
|
33
|
+
*/
|
|
34
|
+
declare const loadCollection: (path: PathLike) => Promise<IconifyJSON>;
|
|
35
|
+
/**
|
|
36
|
+
* Get a collection.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} name The name of the collection
|
|
39
|
+
* @return {Promise<IconifyJSON>}
|
|
40
|
+
*/
|
|
41
|
+
declare const lookupCollection: (name: string) => Promise<IconifyJSON>;
|
|
42
|
+
/**
|
|
43
|
+
* Get list of collections info.
|
|
44
|
+
*
|
|
45
|
+
* @return {Promise<IconifyMetaDataCollection>}
|
|
46
|
+
*/
|
|
47
|
+
declare const lookupCollections: () => Promise<IconifyMetaDataCollection>;
|
|
48
|
+
|
|
49
|
+
export { IconifyMetaDataCollection, loadCollection, locate, lookupCollection, lookupCollections };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";var __import_meta_url = typeof document === 'undefined' ? 'file://' + __filename : new URL('index.js', document.baseURI).href;Object.defineProperty(exports, "__esModule", {value: true});// src/index.ts
|
|
2
|
+
var _fs = require('fs');
|
|
3
|
+
var _url = require('url');
|
|
4
|
+
var _pathe = require('pathe');
|
|
5
|
+
var _dirname = typeof __dirname !== "undefined" ? __dirname : _pathe.dirname.call(void 0, _url.fileURLToPath.call(void 0, __import_meta_url));
|
|
6
|
+
var dir = _pathe.join.call(void 0, _dirname, "/..");
|
|
7
|
+
var locate = (name) => _pathe.join.call(void 0, dir, `./json/${name}.json`);
|
|
8
|
+
var loadCollection = async (path) => {
|
|
9
|
+
return JSON.parse(await _fs.promises.readFile(path, "utf8"));
|
|
10
|
+
};
|
|
11
|
+
var lookupCollection = async (name) => {
|
|
12
|
+
return await loadCollection(locate(name));
|
|
13
|
+
};
|
|
14
|
+
var lookupCollections = async () => {
|
|
15
|
+
return JSON.parse(await _fs.promises.readFile(_pathe.join.call(void 0, dir, "./collections.json"), "utf8"));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.loadCollection = loadCollection; exports.locate = locate; exports.lookupCollection = lookupCollection; exports.lookupCollections = lookupCollections;
|
|
23
|
+
/**
|
|
24
|
+
* This file is part of the iconify.design libraries.
|
|
25
|
+
*
|
|
26
|
+
* (c) Vjacheslav Trushkin <cyberalien@gmail.com>
|
|
27
|
+
*
|
|
28
|
+
* @license MIT
|
|
29
|
+
*
|
|
30
|
+
* For the full copyright and license information, please view the license.txt
|
|
31
|
+
* file that is available in this file's directory.
|
|
32
|
+
*/
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { promises as fs } from "fs";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { dirname, join } from "pathe";
|
|
5
|
+
var _dirname = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
var dir = join(_dirname, "/..");
|
|
7
|
+
var locate = (name) => join(dir, `./json/${name}.json`);
|
|
8
|
+
var loadCollection = async (path) => {
|
|
9
|
+
return JSON.parse(await fs.readFile(path, "utf8"));
|
|
10
|
+
};
|
|
11
|
+
var lookupCollection = async (name) => {
|
|
12
|
+
return await loadCollection(locate(name));
|
|
13
|
+
};
|
|
14
|
+
var lookupCollections = async () => {
|
|
15
|
+
return JSON.parse(await fs.readFile(join(dir, "./collections.json"), "utf8"));
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
loadCollection,
|
|
19
|
+
locate,
|
|
20
|
+
lookupCollection,
|
|
21
|
+
lookupCollections
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* This file is part of the iconify.design libraries.
|
|
25
|
+
*
|
|
26
|
+
* (c) Vjacheslav Trushkin <cyberalien@gmail.com>
|
|
27
|
+
*
|
|
28
|
+
* @license MIT
|
|
29
|
+
*
|
|
30
|
+
* For the full copyright and license information, please view the license.txt
|
|
31
|
+
* file that is available in this file's directory.
|
|
32
|
+
*/
|