Skip to content

Commit 88cf923

Browse files
authored
Merge pull request #393 from db-ui/fix-build-issues
fix: issues with build
2 parents 7422c6c + c95cd28 commit 88cf923

File tree

9 files changed

+43
-1170
lines changed

9 files changed

+43
-1170
lines changed

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
"dist/"
1717
],
1818
"scripts": {
19-
"build": "node esbuild.js",
19+
"build": "npm-run-all -p build:*",
20+
"build:01_cli": "node esbuild.js",
21+
"build:01_icon_fonts_styles": "cpr src/commands/generate-icon-fonts/utils/styles dist/styles -o",
22+
"build:01_icon_fonts_templates": "cpr src/commands/generate-icon-fonts/utils/templates dist/templates -o",
23+
"build:02_rest": "tsc",
2024
"generate:api-docs": "tsx src/api-docs.ts",
2125
"lint": "eslint *.ts",
2226
"prepare": "husky",
@@ -31,7 +35,9 @@
3135
"oslllo-svg-fixer": "^5.0.0",
3236
"prettier": "^3.0.3",
3337
"rimraf": "^6.0.1",
34-
"svgtofont": "^6.0.0"
38+
"svgtofont": "^6.0.0",
39+
"svgo": "^3.3.2",
40+
"svgicons2svgfont": "15.0.0"
3541
},
3642
"devDependencies": {
3743
"@eslint/js": "^9.11.1",
@@ -46,7 +52,6 @@
4652
"globals": "^15.9.0",
4753
"husky": "^9.0.11",
4854
"markdown-table": "^3.0.3",
49-
"npm-run-all": "^4.1.5",
5055
"npm-run-all2": "7.0.2",
5156
"prettier": "^3.0.3",
5257
"tsx": "^4.19.1",

pnpm-lock.yaml

Lines changed: 6 additions & 1150 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commands/clean-icons/data.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
IgnoreGlobsConfigType,
88
ignoreGlobsOption,
99
OutConfigType,
10-
outOption,
1110
SrcConfigType,
1211
srcOption,
1312
} from "../../utils/shared";
@@ -25,7 +24,6 @@ export const cleanIconsOptions: ProgramOptionsType[] = [
2524
name: "traceResolution",
2625
description: "Change the default resolution of the trace",
2726
defaultValue: "600",
28-
required: false,
2927
},
3028
{
3129
name: "out",

src/commands/clean-icons/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ export const cleanIconAction = async (passedConfig: CleanIconsConfigType) => {
4747
}
4848
});
4949

50-
await Promise.all(promises);
50+
return await Promise.all(promises);
5151
};

src/commands/generate-icon-fonts/data.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export const gifOptions: ProgramOptionsType[] = [
6161
name: "fontName",
6262
description: "The name of your font",
6363
required: true,
64+
inquirer: {
65+
input: { message: "What is the name of your font?" },
66+
},
6467
},
6568
{
6669
name: "overwriteSources",

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { log } from "console";
22

3-
export const debugLog = (debug: boolean, message: string) => {
3+
export const debugLog = (debug: boolean | undefined, message: string) => {
44
if (debug) {
55
log(message);
66
}

src/utils/inquirer-process.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const startInquirerProcess = async <T>(
1212
for (const option of optionsWithInquirer) {
1313
const { inquirer } = option;
1414
if (
15-
inquirer.input &&
15+
inquirer?.input &&
1616
(!config[option.name] || config[option.name] === option.defaultValue)
1717
) {
1818
config[option.name] = await input({

src/utils/shared.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export const srcOption: ProgramOptionsType = {
3434
name: "src",
3535
description: "Src folder with all svgs",
3636
required: true,
37+
inquirer: {
38+
input: { message: "What is the source folder with all the svgs?" },
39+
},
3740
};
3841

3942
export const ignoreGlobsOption: ProgramOptionsType = {

tsconfig.json

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
{
2-
"include": ["."],
3-
"exclude": ["lib.dom.d.ts"],
42
"compilerOptions": {
5-
"target": "ESNext",
3+
"target": "esnext",
64
"module": "ESNext",
7-
"lib": ["ESNext", "DOM", "DOM.Iterable"],
8-
"rootDir": ".",
9-
"isolatedModules": true,
10-
"skipLibCheck": true,
11-
"moduleResolution": "node",
5+
"declaration": true,
6+
"outDir": "dist",
7+
"moduleResolution": "Bundler",
128
"experimentalDecorators": true,
13-
"esModuleInterop": true,
14-
"allowSyntheticDefaultImports": true,
15-
"resolveJsonModule": true,
16-
}
9+
"emitDecoratorMetadata": true,
10+
11+
"skipLibCheck": true,
12+
"strict": true /* Enable all strict type-checking options. */,
13+
14+
/* Additional Checks */
15+
"noUnusedLocals": true,
16+
"noUnusedParameters": true,
17+
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
18+
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
19+
"noImplicitAny": false,
20+
21+
"lib": ["esnext", "dom"]
22+
},
23+
"include": ["src/**/*.ts"],
24+
"exclude": ["node_modules", "dist", "test/**/*.ts"]
1725
}

0 commit comments

Comments
 (0)