@fastkit/icon-font-gen 0.2.11 → 0.3.1
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.
|
@@ -8,7 +8,7 @@ var path = require('path');
|
|
|
8
8
|
var chokidar = require('chokidar');
|
|
9
9
|
var ev = require('@fastkit/ev');
|
|
10
10
|
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e[
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
12
12
|
|
|
13
13
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
14
14
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
@@ -49,8 +49,15 @@ async function generateTS(entry, ids) {
|
|
|
49
49
|
/* eslint-disable */
|
|
50
50
|
// @ts-nocheck
|
|
51
51
|
${BANNER}
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
import { registerIconNames } from '@fastkit/icon-font';
|
|
53
|
+
declare module "@fastkit/icon-font" {
|
|
54
|
+
export interface IconNameMap {
|
|
55
|
+
${ids.map((id) => ` '${id}': true,`).join('\n')}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
registerIconNames([${ids.map((id) => `'${id}'`).join(', ')}]);
|
|
59
|
+
export type { IconName } from '@fastkit/icon-font';
|
|
60
|
+
export { ICON_NAMES } from '@fastkit/icon-font';
|
|
54
61
|
`.trim();
|
|
55
62
|
const fileName = `${entry.name || 'icons'}.ts`;
|
|
56
63
|
const dest = path__default.resolve(entry.outputDir, fileName);
|
|
@@ -8,7 +8,7 @@ var path = require('path');
|
|
|
8
8
|
var chokidar = require('chokidar');
|
|
9
9
|
var ev = require('@fastkit/ev');
|
|
10
10
|
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e[
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
12
12
|
|
|
13
13
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
14
14
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
@@ -49,8 +49,15 @@ async function generateTS(entry, ids) {
|
|
|
49
49
|
/* eslint-disable */
|
|
50
50
|
// @ts-nocheck
|
|
51
51
|
${BANNER}
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
import { registerIconNames } from '@fastkit/icon-font';
|
|
53
|
+
declare module "@fastkit/icon-font" {
|
|
54
|
+
export interface IconNameMap {
|
|
55
|
+
${ids.map((id) => ` '${id}': true,`).join('\n')}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
registerIconNames([${ids.map((id) => `'${id}'`).join(', ')}]);
|
|
59
|
+
export type { IconName } from '@fastkit/icon-font';
|
|
60
|
+
export { ICON_NAMES } from '@fastkit/icon-font';
|
|
54
61
|
`.trim();
|
|
55
62
|
const fileName = `${entry.name || 'icons'}.ts`;
|
|
56
63
|
const dest = path__default.resolve(entry.outputDir, fileName);
|
package/dist/icon-font-gen.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EV } from '@fastkit/ev';
|
|
2
2
|
import { RunnerOptions } from 'fantasticon';
|
|
3
3
|
import { RunnerResults } from 'fantasticon/lib/core/runner';
|
|
4
|
-
import { SvgIcons2FontOptions } from 'svgicons2svgfont';
|
|
4
|
+
import type { SvgIcons2FontOptions } from 'svgicons2svgfont';
|
|
5
5
|
|
|
6
6
|
export declare const DEFAULT_OPTIONS: Partial<IconFontEntry>;
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastkit/icon-font-gen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "@fastkit/icon-font-gen",
|
|
5
5
|
"buildOptions": {
|
|
6
6
|
"name": "IconFont",
|
|
@@ -29,10 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/dadajam4/fastkit/tree/main/packages/icon-font-gen#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@fastkit/ev": "0.
|
|
33
|
-
"@fastkit/
|
|
32
|
+
"@fastkit/ev": "0.3.1",
|
|
33
|
+
"@fastkit/icon-font": "0.3.1",
|
|
34
|
+
"@fastkit/tiny-logger": "0.3.1",
|
|
34
35
|
"chokidar": "^3.5.0",
|
|
35
|
-
"fantasticon": "^1.2.
|
|
36
|
+
"fantasticon": "^1.2.2",
|
|
36
37
|
"fs-extra": "^9.1.0"
|
|
37
38
|
}
|
|
38
39
|
}
|