SupportCase 枚举前添加支持新命名方式需要做的修改;package.json 添加 description
This commit is contained in:
parent
2d7f4690be
commit
695bcb830d
18
package.json
18
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "variable-conversion",
|
||||
"displayName": "Variable Conversion",
|
||||
"description": "",
|
||||
"description": "A variable naming conversion extension, support camel case, pascal case, kebab(spinal) case, snake case, snake upper case, upper case, lower case, camel snake case, and more. \n一个变量命名方式互相转换的 VSCode 插件,支持小驼峰(驼峰命名)、大驼峰(帕斯卡命名)、连字符(脊柱式命名)、下划线(蛇形命名)、驼峰蛇形命名、下划线大写、全大写、全小写等常用命名方式",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
"vscode": "^1.87.0"
|
||||
@ -33,6 +33,10 @@
|
||||
"command": "extension.toSnakeCase",
|
||||
"title": "下划线 / 蛇形命名 (Snake Case) [ foo_bar ]"
|
||||
},
|
||||
{
|
||||
"command": "extension.toCamelSnakeCase",
|
||||
"title": "驼峰蛇形命名 (Camel Snake Case) [ Foo_Bar ]"
|
||||
},
|
||||
{
|
||||
"command": "extension.toSnakeUpperCase",
|
||||
"title": "下划线大写 (Snake Upper Case) [ FOO_BAR ]"
|
||||
@ -44,10 +48,6 @@
|
||||
{
|
||||
"command": "extension.toLowerCase",
|
||||
"title": "全小写 (Lower Case) [ foobar ]"
|
||||
},
|
||||
{
|
||||
"command": "extension.toCamelSnakeCase",
|
||||
"title": "驼峰蛇形命名 (Camel Snake Case) [ Foo_Bar ]"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
@ -82,6 +82,10 @@
|
||||
"command": "extension.toSnakeCase",
|
||||
"group": "group-extension"
|
||||
},
|
||||
{
|
||||
"command": "extension.toCamelSnakeCase",
|
||||
"group": "group-extension"
|
||||
},
|
||||
{
|
||||
"command": "extension.toSnakeUpperCase",
|
||||
"group": "group-extension"
|
||||
@ -93,10 +97,6 @@
|
||||
{
|
||||
"command": "extension.toLowerCase",
|
||||
"group": "group-extension"
|
||||
},
|
||||
{
|
||||
"command": "extension.toCamelSnakeCase",
|
||||
"group": "group-extension"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1,10 +1,26 @@
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
* Test:
|
||||
* - Add test case type definition in src/type-definition/test-case-type.ts
|
||||
* - Add test case in src/test/test-case.ts
|
||||
*
|
||||
* Docs:
|
||||
* - Add type definition in below `SupportCase` enum
|
||||
* - Modify `description` in package.json
|
||||
* - Add changes in CHANGELOG.md
|
||||
*/
|
||||
export enum SupportCase {
|
||||
/**
|
||||
* 小驼峰 / 驼峰命名
|
||||
* Camel Case
|
||||
* e.g. fooBar
|
||||
*
|
||||
* @alias: camelCase / CamelCase / camel_case / CAMEL_CASE
|
||||
* @alias: camelCase / CamelCase / camel case / camel_case / CAMEL_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
CAMEL_CASE,
|
||||
@ -14,7 +30,7 @@ export enum SupportCase {
|
||||
* Pascal Case
|
||||
* e.g. FooBar
|
||||
*
|
||||
* @alias: pascalCase / PascalCase / pascal_case / PASCAL_CASE
|
||||
* @alias: pascalCase / PascalCase / pascal case / pascal_case / PASCAL_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
PASCAL_CASE,
|
||||
@ -24,8 +40,8 @@ export enum SupportCase {
|
||||
* Kebab Case / Spinal Case
|
||||
* e.g. foo-bar
|
||||
*
|
||||
* @alias: kebabCase / KebabCase / kebab_case / KEBAB_CASE
|
||||
* spinalCase / SpinalCase / spinal_case / SPINAL_CASE
|
||||
* @alias: kebabCase / KebabCase / kebab case / kebab_case / KEBAB_CASE
|
||||
* spinalCase / SpinalCase / spinal case / spinal_case / SPINAL_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
KEBAB_CASE,
|
||||
@ -35,17 +51,27 @@ export enum SupportCase {
|
||||
* Snake Case
|
||||
* e.g. foo_bar
|
||||
*
|
||||
* @alias: snakeCase / SnakeCase / snake_case / SNAKE_CASE
|
||||
* @alias: snakeCase / SnakeCase / snake case / snake_case / SNAKE_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
SNAKE_CASE,
|
||||
|
||||
/**
|
||||
* 驼峰蛇形命名
|
||||
* Camel Snake Case
|
||||
* e.g. Foo_Bar
|
||||
*
|
||||
* @alias: camelSnakeCase / CamelSnakeCase / camel snake case / camel_snake_case / CAMEL_SNAKE_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
CAMEL_SNAKE_CASE,
|
||||
|
||||
/**
|
||||
* 下划线大写
|
||||
* Snake Upper Case
|
||||
* e.g. FOO_BAR
|
||||
*
|
||||
* @alias: snakeUpperCase / SnakeUpperCase / snake_upper_case / SNAKE_UPPER_CASE
|
||||
* @alias: snakeUpperCase / SnakeUpperCase / snake upper case / snake_upper_case / SNAKE_UPPER_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
SNAKE_UPPER_CASE,
|
||||
@ -55,7 +81,7 @@ export enum SupportCase {
|
||||
* Upper Case
|
||||
* e.g. FOO_BAR / FOOBAR
|
||||
*
|
||||
* @alias: upperCase / UpperCase / upper_case / UPPER_CASE
|
||||
* @alias: upperCase / UpperCase / upper case / upper_case / UPPER_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
UPPER_CASE,
|
||||
@ -65,18 +91,8 @@ export enum SupportCase {
|
||||
* Lower Case
|
||||
* e.g. foo_bar / foobar
|
||||
*
|
||||
* @alias: lowerCase / LowerCase / lower_case / LOWER_CASE
|
||||
* @alias: lowerCase / LowerCase / lower case / lower_case / LOWER_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
LOWER_CASE,
|
||||
|
||||
/**
|
||||
* 驼峰蛇形命名
|
||||
* Camel Snake Case
|
||||
* e.g. Foo_Bar
|
||||
*
|
||||
* @alias: camelSnakeCase / CamelSnakeCase / camel_snake_case / CAMEL_SNAKE_CASE
|
||||
* @since 2024-04-02
|
||||
*/
|
||||
CAMEL_SNAKE_CASE,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user