mirror of
https://github.com/NaN72dev/kunkun-ext-string-utils.git
synced 2025-04-04 10:16:44 +00:00
feat(capital): add capital command
This commit is contained in:
parent
bc4e00f685
commit
0341a5e864
5
build.ts
5
build.ts
@ -3,7 +3,10 @@ import {join} from "path";
|
|||||||
import {refreshTemplateWorkerCommand} from "@kksh/api/dev";
|
import {refreshTemplateWorkerCommand} from "@kksh/api/dev";
|
||||||
import {$} from "bun";
|
import {$} from "bun";
|
||||||
|
|
||||||
const entrypoints = ["./src/camel-case.ts"];
|
const entrypoints = [
|
||||||
|
"./src/camel-case.ts",
|
||||||
|
"./src/capitalize.ts",
|
||||||
|
];
|
||||||
|
|
||||||
async function build() {
|
async function build() {
|
||||||
try {
|
try {
|
||||||
|
@ -20,9 +20,14 @@
|
|||||||
},
|
},
|
||||||
"headlessCmds": [
|
"headlessCmds": [
|
||||||
{
|
{
|
||||||
"name": "Convert clipboard text to Camel Case",
|
"name": "Convert clipboard text to camelCase",
|
||||||
"main": "dist/camel-case.js",
|
"main": "dist/camel-case.js",
|
||||||
"cmds": []
|
"cmds": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Convert clipboard text to Capitalize",
|
||||||
|
"main": "dist/capitalize.js",
|
||||||
|
"cmds": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
11
src/capitalize.ts
Normal file
11
src/capitalize.ts
Normal 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());
|
Loading…
x
Reference in New Issue
Block a user