mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 14:56:17 -04:00
chore(scripts): updated tool creation script
This commit is contained in:
parent
bdcb8badfd
commit
24ff6528f7
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ if (!toolName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const toolNameCamelCase = toolName.replace(/-./g, (x) => x[1].toUpperCase());
|
const toolNameCamelCase = toolName.replace(/-./g, (x) => x[1].toUpperCase());
|
||||||
|
const toolNameTitleCase = toolName[0].toUpperCase() + toolName.slice(1).replace(/-/g, ' ');
|
||||||
const toolDir = join(toolsDir, toolName);
|
const toolDir = join(toolsDir, toolName);
|
||||||
|
|
||||||
await mkdir(toolDir);
|
await mkdir(toolDir);
|
||||||
|
@ -48,7 +49,7 @@ import { ArrowsShuffle } from '@vicons/tabler';
|
||||||
import type { ITool } from './../Tool';
|
import type { ITool } from './../Tool';
|
||||||
|
|
||||||
export const tool: ITool = {
|
export const tool: ITool = {
|
||||||
name: '${toolName}',
|
name: '${toolNameTitleCase}',
|
||||||
path: '/${toolName}',
|
path: '/${toolName}',
|
||||||
description: '',
|
description: '',
|
||||||
keywords: ['${toolName.split('-').join("', '")}'],
|
keywords: ['${toolName.split('-').join("', '")}'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue