mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-20 23:22:05 +08:00
chore: update TypeScript configuration and improve icon generation script
- Adjusted tsconfig.web.json to maintain formatting consistency. - Enhanced tsconfig.json in the ui package by adding strict compiler options for better code quality. - Modified the generate-icons script to remove an unused parameter, streamlining the function call.
This commit is contained in:
parent
3c59b2d057
commit
ad90d22be3
@ -92,7 +92,6 @@ function toCamelCase(filename: string): string {
|
|||||||
* Generate a single icon component
|
* Generate a single icon component
|
||||||
*/
|
*/
|
||||||
async function generateIcon(
|
async function generateIcon(
|
||||||
type: IconType,
|
|
||||||
inputDir: string,
|
inputDir: string,
|
||||||
outputDir: string,
|
outputDir: string,
|
||||||
svgFile: string
|
svgFile: string
|
||||||
@ -194,7 +193,7 @@ async function main() {
|
|||||||
|
|
||||||
for (const svgFile of svgFiles) {
|
for (const svgFile of svgFiles) {
|
||||||
try {
|
try {
|
||||||
const result = await generateIcon(type, inputDir, outputDir, svgFile)
|
const result = await generateIcon(inputDir, outputDir, svgFile)
|
||||||
components.push(result)
|
components.push(result)
|
||||||
console.log(`✅ ${svgFile} -> ${result.filename} (${result.componentName})`)
|
console.log(`✅ ${svgFile} -> ${result.filename} (${result.componentName})`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@ -20,8 +20,11 @@
|
|||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
"target": "ES2020"
|
"target": "ES2020"
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "dist", "**/*.test.*", "**/__tests__/**"],
|
"exclude": ["node_modules", "dist", "**/*.test.*", "**/__tests__/**"],
|
||||||
"include": ["src/**/*", "stories/components/**/*"]
|
"include": ["src/**/*", "stories/components/**/*", "scripts/**/*"]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
"packages/ai-sdk-provider/**/*",
|
"packages/ai-sdk-provider/**/*",
|
||||||
"packages/extension-table-plus/**/*",
|
"packages/extension-table-plus/**/*",
|
||||||
"packages/mcp-trace/**/*",
|
"packages/mcp-trace/**/*",
|
||||||
"packages/shared/**/*",
|
"packages/shared/**/*"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user