@ng-icons/core 33.0.0 → 33.1.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/package.json +8 -2
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +51 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +4 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +106 -0
- package/schematics/schema.json +106 -0
- package/schematics/tsconfig.json +18 -0
- package/types/ng-icons-core.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-icons/core",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -11,10 +11,16 @@
|
|
|
11
11
|
"url": "https://github.com/ng-icons/ng-icons"
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://ng-icons.github.io/ng-icons/",
|
|
14
|
+
"schematics": "./schematics/collection.json",
|
|
15
|
+
"ng-add": {
|
|
16
|
+
"save": "dependencies"
|
|
17
|
+
},
|
|
14
18
|
"peerDependencies": {
|
|
15
19
|
"@angular/core": ">=21.0.0",
|
|
16
20
|
"@angular/common": ">=21.0.0",
|
|
17
|
-
"rxjs": "^6.5.3 || ^7.4.0"
|
|
21
|
+
"rxjs": "^6.5.3 || ^7.4.0",
|
|
22
|
+
"@angular-devkit/schematics": ">=21.0.0",
|
|
23
|
+
"@schematics/angular": ">=21.0.0"
|
|
18
24
|
},
|
|
19
25
|
"module": "fesm2022/ng-icons-core.mjs",
|
|
20
26
|
"typings": "types/ng-icons-core.d.ts",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"ng-add": {
|
|
5
|
+
"description": "Add ng-icons to an Angular project",
|
|
6
|
+
"factory": "./schematics/ng-add/index#ngAdd",
|
|
7
|
+
"schema": "./ng-add/schema.json"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ngAdd = ngAdd;
|
|
4
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
+
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
function getPackageVersion() {
|
|
9
|
+
try {
|
|
10
|
+
// Try to read the package.json from the distributed package
|
|
11
|
+
const packagePath = (0, path_1.join)(__dirname, '../../package.json');
|
|
12
|
+
const packageJson = JSON.parse((0, fs_1.readFileSync)(packagePath, 'utf-8'));
|
|
13
|
+
return `^${packageJson.version}`;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
// Fallback version if package.json can't be read
|
|
17
|
+
return '^33.0.0';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function ngAdd(options) {
|
|
21
|
+
return (tree, context) => {
|
|
22
|
+
context.logger.info('Adding ng-icons to your project...');
|
|
23
|
+
const version = getPackageVersion();
|
|
24
|
+
// Add the core dependency
|
|
25
|
+
const coreDependency = {
|
|
26
|
+
type: dependencies_1.NodeDependencyType.Default,
|
|
27
|
+
name: '@ng-icons/core',
|
|
28
|
+
version,
|
|
29
|
+
overwrite: true,
|
|
30
|
+
};
|
|
31
|
+
(0, dependencies_1.addPackageJsonDependency)(tree, coreDependency);
|
|
32
|
+
context.logger.info('Added @ng-icons/core dependency');
|
|
33
|
+
// Add selected iconset dependencies
|
|
34
|
+
if (options.iconsets && options.iconsets.length > 0) {
|
|
35
|
+
for (const iconset of options.iconsets) {
|
|
36
|
+
const iconsetDependency = {
|
|
37
|
+
type: dependencies_1.NodeDependencyType.Default,
|
|
38
|
+
name: `@ng-icons/${iconset}`,
|
|
39
|
+
version,
|
|
40
|
+
overwrite: true,
|
|
41
|
+
};
|
|
42
|
+
(0, dependencies_1.addPackageJsonDependency)(tree, iconsetDependency);
|
|
43
|
+
context.logger.info(`Added @ng-icons/${iconset} dependency`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// Schedule package installation
|
|
47
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
48
|
+
return tree;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/core/schematics/ng-add/index.ts"],"names":[],"mappings":";;AAuBA,sBAqCC;AA3DD,4DAA0E;AAC1E,2EAIkD;AAClD,2BAAkC;AAClC,+BAA4B;AAG5B,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,4DAA4D;QAC5D,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;QAC1D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,iDAAiD;QACjD,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,KAAK,CAAC,OAAqB;IACzC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;QAE1D,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;QAEpC,0BAA0B;QAC1B,MAAM,cAAc,GAAmB;YACrC,IAAI,EAAE,iCAAkB,CAAC,OAAO;YAChC,IAAI,EAAE,gBAAgB;YACtB,OAAO;YACP,SAAS,EAAE,IAAI;SAChB,CAAC;QAEF,IAAA,uCAAwB,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAC/C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QAEvD,oCAAoC;QACpC,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpD,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACvC,MAAM,iBAAiB,GAAmB;oBACxC,IAAI,EAAE,iCAAkB,CAAC,OAAO;oBAChC,IAAI,EAAE,aAAa,OAAO,EAAE;oBAC5B,OAAO;oBACP,SAAS,EAAE,IAAI;iBAChB,CAAC;gBAEF,IAAA,uCAAwB,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;gBAClD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,OAAO,aAAa,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;QAED,gCAAgC;QAChC,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../packages/core/schematics/ng-add/schema.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"id": "NgIconsAdd",
|
|
4
|
+
"title": "ng-icons ng-add schematic",
|
|
5
|
+
"description": "Add ng-icons to an Angular project and optionally install iconsets",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"iconsets": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"description": "Iconsets to install",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"akar-icons",
|
|
15
|
+
"bootstrap-icons",
|
|
16
|
+
"boxicons",
|
|
17
|
+
"circum-icons",
|
|
18
|
+
"cryptocurrency-icons",
|
|
19
|
+
"css-gg",
|
|
20
|
+
"devicon",
|
|
21
|
+
"dripicons",
|
|
22
|
+
"feather-icons",
|
|
23
|
+
"flag-icons",
|
|
24
|
+
"font-awesome",
|
|
25
|
+
"game-icons",
|
|
26
|
+
"heroicons",
|
|
27
|
+
"huge-icons",
|
|
28
|
+
"iconoir",
|
|
29
|
+
"iconsax",
|
|
30
|
+
"ionicons",
|
|
31
|
+
"jam-icons",
|
|
32
|
+
"lets-icons",
|
|
33
|
+
"lucide",
|
|
34
|
+
"material-file-icons",
|
|
35
|
+
"material-icons",
|
|
36
|
+
"material-symbols",
|
|
37
|
+
"mono-icons",
|
|
38
|
+
"mynaui",
|
|
39
|
+
"octicons",
|
|
40
|
+
"phosphor-icons",
|
|
41
|
+
"radix-icons",
|
|
42
|
+
"remixicon",
|
|
43
|
+
"simple-icons",
|
|
44
|
+
"solar-icons",
|
|
45
|
+
"svgl",
|
|
46
|
+
"tabler-icons",
|
|
47
|
+
"tdesign-icons",
|
|
48
|
+
"typicons",
|
|
49
|
+
"ux-aspects"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"default": [],
|
|
53
|
+
"x-prompt": {
|
|
54
|
+
"message": "Which iconsets would you like to install?",
|
|
55
|
+
"type": "list",
|
|
56
|
+
"multiselect": true,
|
|
57
|
+
"items": [
|
|
58
|
+
{ "value": "akar-icons", "label": "Akar Icons" },
|
|
59
|
+
{ "value": "bootstrap-icons", "label": "Bootstrap Icons" },
|
|
60
|
+
{ "value": "boxicons", "label": "Boxicons" },
|
|
61
|
+
{ "value": "circum-icons", "label": "Circum Icons" },
|
|
62
|
+
{ "value": "cryptocurrency-icons", "label": "Cryptocurrency Icons" },
|
|
63
|
+
{ "value": "css-gg", "label": "CSS.gg" },
|
|
64
|
+
{ "value": "devicon", "label": "Devicon" },
|
|
65
|
+
{ "value": "dripicons", "label": "Dripicons" },
|
|
66
|
+
{ "value": "feather-icons", "label": "Feather Icons" },
|
|
67
|
+
{ "value": "flag-icons", "label": "Flag Icons" },
|
|
68
|
+
{ "value": "font-awesome", "label": "Font Awesome" },
|
|
69
|
+
{ "value": "game-icons", "label": "Game Icons" },
|
|
70
|
+
{ "value": "heroicons", "label": "Heroicons" },
|
|
71
|
+
{ "value": "huge-icons", "label": "Huge Icons" },
|
|
72
|
+
{ "value": "iconoir", "label": "Iconoir" },
|
|
73
|
+
{ "value": "iconsax", "label": "Iconsax" },
|
|
74
|
+
{ "value": "ionicons", "label": "Ionicons" },
|
|
75
|
+
{ "value": "jam-icons", "label": "Jam Icons" },
|
|
76
|
+
{ "value": "lets-icons", "label": "Let's Icons" },
|
|
77
|
+
{ "value": "lucide", "label": "Lucide" },
|
|
78
|
+
{ "value": "material-file-icons", "label": "Material File Icons" },
|
|
79
|
+
{ "value": "material-icons", "label": "Material Icons" },
|
|
80
|
+
{ "value": "material-symbols", "label": "Material Symbols" },
|
|
81
|
+
{ "value": "mono-icons", "label": "Mono Icons" },
|
|
82
|
+
{ "value": "mynaui", "label": "Mynaui" },
|
|
83
|
+
{ "value": "octicons", "label": "Octicons" },
|
|
84
|
+
{ "value": "phosphor-icons", "label": "Phosphor Icons" },
|
|
85
|
+
{ "value": "radix-icons", "label": "Radix Icons" },
|
|
86
|
+
{ "value": "remixicon", "label": "Remixicon" },
|
|
87
|
+
{ "value": "simple-icons", "label": "Simple Icons" },
|
|
88
|
+
{ "value": "solar-icons", "label": "Solar Icons" },
|
|
89
|
+
{ "value": "svgl", "label": "SVGL" },
|
|
90
|
+
{ "value": "tabler-icons", "label": "Tabler Icons" },
|
|
91
|
+
{ "value": "tdesign-icons", "label": "TDesign Icons" },
|
|
92
|
+
{ "value": "typicons", "label": "Typicons" },
|
|
93
|
+
{ "value": "ux-aspects", "label": "UX Aspects" }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"project": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "The name of the project to add ng-icons to",
|
|
100
|
+
"$default": {
|
|
101
|
+
"$source": "projectName"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": []
|
|
106
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"id": "NgIconsAdd",
|
|
4
|
+
"title": "ng-icons ng-add schematic",
|
|
5
|
+
"description": "Add ng-icons to an Angular project and optionally install iconsets",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"iconsets": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"description": "Iconsets to install",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"akar-icons",
|
|
15
|
+
"bootstrap-icons",
|
|
16
|
+
"boxicons",
|
|
17
|
+
"circum-icons",
|
|
18
|
+
"cryptocurrency-icons",
|
|
19
|
+
"css-gg",
|
|
20
|
+
"devicon",
|
|
21
|
+
"dripicons",
|
|
22
|
+
"feather-icons",
|
|
23
|
+
"flag-icons",
|
|
24
|
+
"font-awesome",
|
|
25
|
+
"game-icons",
|
|
26
|
+
"heroicons",
|
|
27
|
+
"huge-icons",
|
|
28
|
+
"iconoir",
|
|
29
|
+
"iconsax",
|
|
30
|
+
"ionicons",
|
|
31
|
+
"jam-icons",
|
|
32
|
+
"lets-icons",
|
|
33
|
+
"lucide",
|
|
34
|
+
"material-file-icons",
|
|
35
|
+
"material-icons",
|
|
36
|
+
"material-symbols",
|
|
37
|
+
"mono-icons",
|
|
38
|
+
"mynaui",
|
|
39
|
+
"octicons",
|
|
40
|
+
"phosphor-icons",
|
|
41
|
+
"radix-icons",
|
|
42
|
+
"remixicon",
|
|
43
|
+
"simple-icons",
|
|
44
|
+
"solar-icons",
|
|
45
|
+
"svgl",
|
|
46
|
+
"tabler-icons",
|
|
47
|
+
"tdesign-icons",
|
|
48
|
+
"typicons",
|
|
49
|
+
"ux-aspects"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"default": [],
|
|
53
|
+
"x-prompt": {
|
|
54
|
+
"message": "Which iconsets would you like to install?",
|
|
55
|
+
"type": "list",
|
|
56
|
+
"multiselect": true,
|
|
57
|
+
"items": [
|
|
58
|
+
{ "value": "akar-icons", "label": "Akar Icons" },
|
|
59
|
+
{ "value": "bootstrap-icons", "label": "Bootstrap Icons" },
|
|
60
|
+
{ "value": "boxicons", "label": "Boxicons" },
|
|
61
|
+
{ "value": "circum-icons", "label": "Circum Icons" },
|
|
62
|
+
{ "value": "cryptocurrency-icons", "label": "Cryptocurrency Icons" },
|
|
63
|
+
{ "value": "css-gg", "label": "CSS.gg" },
|
|
64
|
+
{ "value": "devicon", "label": "Devicon" },
|
|
65
|
+
{ "value": "dripicons", "label": "Dripicons" },
|
|
66
|
+
{ "value": "feather-icons", "label": "Feather Icons" },
|
|
67
|
+
{ "value": "flag-icons", "label": "Flag Icons" },
|
|
68
|
+
{ "value": "font-awesome", "label": "Font Awesome" },
|
|
69
|
+
{ "value": "game-icons", "label": "Game Icons" },
|
|
70
|
+
{ "value": "heroicons", "label": "Heroicons" },
|
|
71
|
+
{ "value": "huge-icons", "label": "Huge Icons" },
|
|
72
|
+
{ "value": "iconoir", "label": "Iconoir" },
|
|
73
|
+
{ "value": "iconsax", "label": "Iconsax" },
|
|
74
|
+
{ "value": "ionicons", "label": "Ionicons" },
|
|
75
|
+
{ "value": "jam-icons", "label": "Jam Icons" },
|
|
76
|
+
{ "value": "lets-icons", "label": "Let's Icons" },
|
|
77
|
+
{ "value": "lucide", "label": "Lucide" },
|
|
78
|
+
{ "value": "material-file-icons", "label": "Material File Icons" },
|
|
79
|
+
{ "value": "material-icons", "label": "Material Icons" },
|
|
80
|
+
{ "value": "material-symbols", "label": "Material Symbols" },
|
|
81
|
+
{ "value": "mono-icons", "label": "Mono Icons" },
|
|
82
|
+
{ "value": "mynaui", "label": "Mynaui" },
|
|
83
|
+
{ "value": "octicons", "label": "Octicons" },
|
|
84
|
+
{ "value": "phosphor-icons", "label": "Phosphor Icons" },
|
|
85
|
+
{ "value": "radix-icons", "label": "Radix Icons" },
|
|
86
|
+
{ "value": "remixicon", "label": "Remixicon" },
|
|
87
|
+
{ "value": "simple-icons", "label": "Simple Icons" },
|
|
88
|
+
{ "value": "solar-icons", "label": "Solar Icons" },
|
|
89
|
+
{ "value": "svgl", "label": "SVGL" },
|
|
90
|
+
{ "value": "tabler-icons", "label": "Tabler Icons" },
|
|
91
|
+
{ "value": "tdesign-icons", "label": "TDesign Icons" },
|
|
92
|
+
{ "value": "typicons", "label": "Typicons" },
|
|
93
|
+
{ "value": "ux-aspects", "label": "UX Aspects" }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"project": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "The name of the project to add ng-icons to",
|
|
100
|
+
"$default": {
|
|
101
|
+
"$source": "projectName"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": []
|
|
106
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../../dist/packages/core/schematics",
|
|
5
|
+
"types": ["node", "vitest"],
|
|
6
|
+
"module": "commonjs",
|
|
7
|
+
"target": "ES2020",
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"rootDir": ".",
|
|
14
|
+
"preserveWatchOutput": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["**/*.ts"],
|
|
17
|
+
"exclude": ["**/*.spec.ts"]
|
|
18
|
+
}
|