From 66e5b23f5434925af0b89175f097633136980461 Mon Sep 17 00:00:00 2001 From: "Ibrahima G. Coulibaly" Date: Mon, 24 Jun 2024 00:58:05 +0100 Subject: [PATCH] fix: create-tool.mjs --- .idea/workspace.xml | 25 +++++++++++++++---- scripts/create-tool.mjs | 3 +-- .../image/png/change-colors-in-png/meta.ts | 2 +- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e07ca9d..d0aa565 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,7 +5,14 @@ - + + + + + + + + - + @@ -131,9 +138,9 @@ + - @@ -158,7 +165,7 @@ - + - diff --git a/scripts/create-tool.mjs b/scripts/create-tool.mjs index 4739730..67d0084 100644 --- a/scripts/create-tool.mjs +++ b/scripts/create-tool.mjs @@ -71,7 +71,6 @@ export default function ${capitalizeFirstLetter(toolNameCamelCase)}() { } ` ) - createToolFile( `meta.ts`, ` @@ -79,7 +78,7 @@ import { defineTool } from '@tools/defineTool'; import { lazy } from 'react'; // import image from '@assets/text.png'; -export const tool = defineTool('${folder}', { +export const tool = defineTool('${folder.split(sep)[folder.split(sep).length - 1]}', { name: '${toolNameTitleCase}', path: '/${toolName}', // image, diff --git a/src/pages/image/png/change-colors-in-png/meta.ts b/src/pages/image/png/change-colors-in-png/meta.ts index d165de9..5a0e5c6 100644 --- a/src/pages/image/png/change-colors-in-png/meta.ts +++ b/src/pages/image/png/change-colors-in-png/meta.ts @@ -2,7 +2,7 @@ import { defineTool } from '@tools/defineTool'; import { lazy } from 'react'; import image from '@assets/text.png'; -export const tool = defineTool('image/png', { +export const tool = defineTool('png', { name: 'Change colors in png', path: '/change-colors-in-png', image,