feat(capital): add capital command

This commit is contained in:
Nan72 2025-02-14 12:25:40 +07:00
parent bc4e00f685
commit 0341a5e864
No known key found for this signature in database
3 changed files with 21 additions and 2 deletions

View File

@ -3,7 +3,10 @@ import {join} from "path";
import {refreshTemplateWorkerCommand} from "@kksh/api/dev";
import {$} from "bun";
const entrypoints = ["./src/camel-case.ts"];
const entrypoints = [
"./src/camel-case.ts",
"./src/capitalize.ts",
];
async function build() {
try {

View File

@ -20,9 +20,14 @@
},
"headlessCmds": [
{
"name": "Convert clipboard text to Camel Case",
"name": "Convert clipboard text to camelCase",
"main": "dist/camel-case.js",
"cmds": []
},
{
"name": "Convert clipboard text to Capitalize",
"main": "dist/capitalize.js",
"cmds": []
}
]
},

11
src/capitalize.ts Normal file
View File

@ -0,0 +1,11 @@
import {expose} from "@kksh/api/headless";
import capitalize from "lodash/capitalize";
import {BaseExt} from "./base";
class CapitalizeExt extends BaseExt {
constructor() {
super(capitalize);
}
}
expose(new CapitalizeExt());