diff --git a/README.md b/README.md index 828b9fd..aab6008 100644 --- a/README.md +++ b/README.md @@ -38,24 +38,24 @@ Or right-click on the selected text -> Convert string to... ## 支持的类型 Support Case -| 类型 | Case | 举例 e.g. | -| ----------------------------------- | ------------------------ | ---------------- | -| 小驼峰(驼峰)命名 | Camel Case | fooBar | -| 大驼峰(帕斯卡)命名 | Pascal Case | FooBar | -| 下划线(蛇形)命名 | Snake Case | foo_bar | -| 下划线(蛇形) + 小驼峰(驼峰)命名 | Snake Camel Case | foo_Bar | -| 下划线(蛇形) + 大驼峰(帕斯卡)命名 | Snake Pascal Case | Foo_Bar | -| 下划线(蛇形) + 全大写命名 | Snake Upper Case | FOO_BAR | +| 类型 | Case | 举例 e.g. | +| ------------------------------------------ | ------------------------ | ---------------- | +| 小驼峰(驼峰)命名 | Camel Case | fooBar | +| 大驼峰(帕斯卡)命名 | Pascal Case | FooBar | +| 下划线(蛇形)命名 | Snake Case | foo_bar | +| 下划线(蛇形) + 小驼峰(驼峰)命名 | Snake Camel Case | foo_Bar | +| 下划线(蛇形) + 大驼峰(帕斯卡)命名 | Snake Pascal Case | Foo_Bar | +| 下划线(蛇形) + 全大写命名 | Snake Upper Case | FOO_BAR | | 中划线(连字符/脊柱式)命名 | Kebab Case / Spinal Case | foo-bar | | 中划线(连字符/脊柱式) + 小驼峰(驼峰)命名 | Kebab Camel Case | foo-Bar | | 中划线(连字符/脊柱式) + 大驼峰(帕斯卡)命名 | Kebab Pascal Case | Foo-Bar | | 中划线(连字符/脊柱式) + 全大写命名 | Kebab Upper Case | FOO-BAR | -| 空格分隔命名 | Space Case | foo bar | -| 空格分隔 + 小驼峰(驼峰)命名 | Space Camel Case | foo Bar | -| 空格分隔 + 大驼峰(帕斯卡)命名 | Space Pascal Case | Foo Bar | -| 空格分隔 + 全大写命名 | Space Upper Case | FOO BAR | -| 全小写 | Lower Case | foo_bar / foobar | -| 全大写 | Upper Case | FOO_BAR / FOOBAR | +| 空格分隔命名 | Space Case | foo bar | +| 空格分隔 + 小驼峰(驼峰)命名 | Space Camel Case | foo Bar | +| 空格分隔 + 大驼峰(帕斯卡)命名 | Space Pascal Case | Foo Bar | +| 空格分隔 + 全大写命名 | Space Upper Case | FOO BAR | +| 全小写 | Lower Case | foo_bar / foobar | +| 全大写 | Upper Case | FOO_BAR / FOOBAR | diff --git a/src/extension-handler/editor-submenu-handler.ts b/src/extension-handler/editor-submenu-handler.ts index 338e6cf..d190e01 100644 --- a/src/extension-handler/editor-submenu-handler.ts +++ b/src/extension-handler/editor-submenu-handler.ts @@ -16,7 +16,6 @@ const handleEditorReplace = (targetCase: SupportCase) => { return; } - // console.log('============ start convert ============'); let document = editor.document; let selection = editor.selection; let eol: EOL = document.eol === vscode.EndOfLine.CRLF ? '\r\n' : '\n'; @@ -45,7 +44,6 @@ const handleEditorReplace = (targetCase: SupportCase) => { editor.edit(editBuilder => { editBuilder.replace(selection, converted); }); - // console.log('============ finish convert ============'); }; export default handleEditorReplace; diff --git a/src/type-definition/SupportCaseType.ts b/src/type-definition/SupportCaseType.ts index 8e28667..ccd0122 100644 --- a/src/type-definition/SupportCaseType.ts +++ b/src/type-definition/SupportCaseType.ts @@ -2,20 +2,18 @@ * When support a new case, there's something we need to do. * * Code: - * - Add `commands`, `menus` parts in package.json (and package-comment.jsonc) - * - Add main conversion logic in src/main-code/variable-conversion.ts - * - Add disposable in src/extension.ts + * - Add type definition in below `SupportCase` enum and following array + * - Add `commands`, `menus` parts in [package.json] and [package-comment.jsonc] + * - Add main conversion logic in [src/main-code/conversion.ts] * * Test: - * - Add test case type definition in src/type-definition/test-case-type.ts - * - Add test case in src/test/test-case.ts - * - Add test code in src/test/extension.test.ts + * - Add test case type definition in [src/type-definition/TestCaseType.ts] + * - Add test case in [src/test/test-case.ts] + * - Add test code in [src/test/extension.test.ts] * * Docs: - * - Add type definition in below `SupportCase` enum - * - Modify `description` in package.json - * - Add changes in CHANGELOG.md - * - Add changes in README.md + * - Modify `description` in [package.json] and [package-comment.jsonc] + * - Add changes in [CHANGELOG.md] and [README.md] */ export enum SupportCase {