mirror of
https://github.com/NaN72dev/kunkun-ext-string-utils.git
synced 2025-04-03 17:56:45 +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 {$} from "bun";
|
||||
|
||||
const entrypoints = ["./src/camel-case.ts"];
|
||||
const entrypoints = [
|
||||
"./src/camel-case.ts",
|
||||
"./src/capitalize.ts",
|
||||
];
|
||||
|
||||
async function build() {
|
||||
try {
|
||||
|
@ -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
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