@ffflorian/electron-icon-generator 1.14.1 → 1.14.2
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/dist/cli.js +1 -1
- package/dist/index.js +17 -7
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { program as commander } from 'commander';
|
|
2
3
|
import fs from 'node:fs/promises';
|
|
3
4
|
import path from 'node:path';
|
|
4
|
-
import { program as commander } from 'commander';
|
|
5
5
|
import { IconGenerator } from './index.js';
|
|
6
6
|
const __dirname = import.meta.dirname;
|
|
7
7
|
const packageJsonPath = path.join(__dirname, '../package.json');
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import icongen from 'icon-gen';
|
|
3
|
+
import { Jimp } from 'jimp';
|
|
2
4
|
import fs from 'node:fs/promises';
|
|
3
5
|
import path from 'node:path';
|
|
4
|
-
import { Jimp } from 'jimp';
|
|
5
|
-
import icongen from 'icon-gen';
|
|
6
6
|
// eslint-disable-next-line no-magic-numbers
|
|
7
7
|
const pngSizes = [16, 24, 32, 48, 64, 128, 256, 512, 1024];
|
|
8
8
|
export class IconGenerator {
|
|
@@ -22,15 +22,21 @@ export class IconGenerator {
|
|
|
22
22
|
try {
|
|
23
23
|
await fs.mkdir(this.options.output, { recursive: true });
|
|
24
24
|
}
|
|
25
|
-
catch (_a) {
|
|
25
|
+
catch (_a) {
|
|
26
|
+
// no-op
|
|
27
|
+
}
|
|
26
28
|
try {
|
|
27
29
|
await fs.mkdir(this.iconsDir, { recursive: true });
|
|
28
30
|
}
|
|
29
|
-
catch (_b) {
|
|
31
|
+
catch (_b) {
|
|
32
|
+
// no-op
|
|
33
|
+
}
|
|
30
34
|
try {
|
|
31
35
|
await fs.mkdir(this.PNGoutputDir, { recursive: true });
|
|
32
36
|
}
|
|
33
|
-
catch (_c) {
|
|
37
|
+
catch (_c) {
|
|
38
|
+
// no-op
|
|
39
|
+
}
|
|
34
40
|
const image = await Jimp.read(this.options.input);
|
|
35
41
|
const resizeFilePath = path.join(this.PNGoutputDir, fileName);
|
|
36
42
|
// eslint-disable-next-line id-length
|
|
@@ -50,7 +56,9 @@ export class IconGenerator {
|
|
|
50
56
|
try {
|
|
51
57
|
await fs.mkdir(macIconsDir, { recursive: true });
|
|
52
58
|
}
|
|
53
|
-
catch (_a) {
|
|
59
|
+
catch (_a) {
|
|
60
|
+
// no-op
|
|
61
|
+
}
|
|
54
62
|
await icongen.default(this.PNGoutputDir, macIconsDir, {
|
|
55
63
|
icns: {
|
|
56
64
|
name: 'icon',
|
|
@@ -61,7 +69,9 @@ export class IconGenerator {
|
|
|
61
69
|
try {
|
|
62
70
|
await fs.mkdir(winIconsDir, { recursive: true });
|
|
63
71
|
}
|
|
64
|
-
catch (_b) {
|
|
72
|
+
catch (_b) {
|
|
73
|
+
// no-op
|
|
74
|
+
}
|
|
65
75
|
await icongen.default(this.PNGoutputDir, winIconsDir, {
|
|
66
76
|
icns: {
|
|
67
77
|
name: 'icon',
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
3
|
"bin": "dist/index.js",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"commander": "14.0.
|
|
5
|
+
"commander": "14.0.3",
|
|
6
6
|
"icon-gen": "5.0.0",
|
|
7
7
|
"jimp": "1.6.0"
|
|
8
8
|
},
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
"test": "exit 0"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "1.14.
|
|
44
|
-
"gitHead": "
|
|
43
|
+
"version": "1.14.2",
|
|
44
|
+
"gitHead": "59997e7c64b551213644945256b13ff3ba1ccfcd"
|
|
45
45
|
}
|