Skip to content

Commit

Permalink
Merge pull request #393 from db-ui/fix-build-issues
Browse files Browse the repository at this point in the history
fix: issues with build
  • Loading branch information
nmerget authored Jan 9, 2025
2 parents 7422c6c + c95cd28 commit 88cf923
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 1,170 deletions.
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
"dist/"
],
"scripts": {
"build": "node esbuild.js",
"build": "npm-run-all -p build:*",
"build:01_cli": "node esbuild.js",
"build:01_icon_fonts_styles": "cpr src/commands/generate-icon-fonts/utils/styles dist/styles -o",
"build:01_icon_fonts_templates": "cpr src/commands/generate-icon-fonts/utils/templates dist/templates -o",
"build:02_rest": "tsc",
"generate:api-docs": "tsx src/api-docs.ts",
"lint": "eslint *.ts",
"prepare": "husky",
Expand All @@ -31,7 +35,9 @@
"oslllo-svg-fixer": "^5.0.0",
"prettier": "^3.0.3",
"rimraf": "^6.0.1",
"svgtofont": "^6.0.0"
"svgtofont": "^6.0.0",
"svgo": "^3.3.2",
"svgicons2svgfont": "15.0.0"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
Expand All @@ -46,7 +52,6 @@
"globals": "^15.9.0",
"husky": "^9.0.11",
"markdown-table": "^3.0.3",
"npm-run-all": "^4.1.5",
"npm-run-all2": "7.0.2",
"prettier": "^3.0.3",
"tsx": "^4.19.1",
Expand Down
1,156 changes: 6 additions & 1,150 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/commands/clean-icons/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
IgnoreGlobsConfigType,
ignoreGlobsOption,
OutConfigType,
outOption,
SrcConfigType,
srcOption,
} from "../../utils/shared";
Expand All @@ -25,7 +24,6 @@ export const cleanIconsOptions: ProgramOptionsType[] = [
name: "traceResolution",
description: "Change the default resolution of the trace",
defaultValue: "600",
required: false,
},
{
name: "out",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/clean-icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ export const cleanIconAction = async (passedConfig: CleanIconsConfigType) => {
}
});

await Promise.all(promises);
return await Promise.all(promises);
};
3 changes: 3 additions & 0 deletions src/commands/generate-icon-fonts/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export const gifOptions: ProgramOptionsType[] = [
name: "fontName",
description: "The name of your font",
required: true,
inquirer: {
input: { message: "What is the name of your font?" },
},
},
{
name: "overwriteSources",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { log } from "console";

export const debugLog = (debug: boolean, message: string) => {
export const debugLog = (debug: boolean | undefined, message: string) => {
if (debug) {
log(message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/inquirer-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const startInquirerProcess = async <T>(
for (const option of optionsWithInquirer) {
const { inquirer } = option;
if (
inquirer.input &&
inquirer?.input &&
(!config[option.name] || config[option.name] === option.defaultValue)
) {
config[option.name] = await input({
Expand Down
3 changes: 3 additions & 0 deletions src/utils/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export const srcOption: ProgramOptionsType = {
name: "src",
description: "Src folder with all svgs",
required: true,
inquirer: {
input: { message: "What is the source folder with all the svgs?" },
},
};

export const ignoreGlobsOption: ProgramOptionsType = {
Expand Down
32 changes: 20 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
{
"include": ["."],
"exclude": ["lib.dom.d.ts"],
"compilerOptions": {
"target": "ESNext",
"target": "esnext",
"module": "ESNext",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"rootDir": ".",
"isolatedModules": true,
"skipLibCheck": true,
"moduleResolution": "node",
"declaration": true,
"outDir": "dist",
"moduleResolution": "Bundler",
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
}
"emitDecoratorMetadata": true,

"skipLibCheck": true,
"strict": true /* Enable all strict type-checking options. */,

/* Additional Checks */
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
"noImplicitAny": false,

"lib": ["esnext", "dom"]
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist", "test/**/*.ts"]
}

0 comments on commit 88cf923

Please sign in to comment.