Skip to content

Commit

Permalink
feat: change the copy and code snippet of getter
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdiangunawan committed Mar 6, 2024
1 parent d9c1693 commit c135ff0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Change Log


## 0.0.4 (2024-2-29)
## 0.0.6 (2024-3-7)

- Add new command "Create Getter File Template YAML" to make custom auto import as template when creating getter file.
- Add "ignore" section to getter_file_template.yaml

## 0.0.5 (2024-3-6)

- Remove Direct Getter feature

## 0.0.3 (2024-2-26)

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ When you run Command+Shift + P, there will be 2 options

![Two option menus](./screenshots/two_option_menus.png)

## Direct Getter

Generate a direct getter extension for the selected Dart class.

![Direct getter example](./screenshots/direct_example.png)

## Grouped Getter

Generate getter with the grouped getter. It allows you to have more than
Expand All @@ -42,6 +36,12 @@ It will be saved on the 'getter' dir in the same parent directory.

![The file result](./screenshots/files.png)

### 0.0.6
Add "ignore" section to getter_file_template.yaml

### 0.0.5
Remove Direct Getter feature

### 0.0.4

Add new command "Create Getter File Template YAML" to make custom auto import as template when creating getter file.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dart-getter",
"displayName": "Dart Getter File Generator",
"description": "generate getter by dart file naming. This snipped code uses dart extension to create getter",
"version": "0.0.5",
"version": "0.0.6",
"icon": "screenshots/icon.png",
"publisher": "FerdianGunawan",
"repository": {
Expand Down
10 changes: 5 additions & 5 deletions src/extensions/groupedGetterExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ export async function createGroupedGetter() {
true
);

const exampleGetterName = await vscode.window.showInputBox({
prompt: "Enter the name of grouped getter:",
placeHolder: "write your grouped getter here ex: skill",
var exampleGetterName = await vscode.window.showInputBox({
prompt: "Enter the name of getter group:",
placeHolder: "ex: getter/historyGetter/scheduleGetter",
value: "",
});

if (!exampleGetterName) {
return;
exampleGetterName = "getter";
}

const cleanedGetterName = exampleGetterName.replace(/[^a-zA-Z]/g, "");

const exampleGetterNameCapitalize = capitalizeFirstLetter(cleanedGetterName);
const exampleGetterNameLower = lowercaseFirstLetter(cleanedGetterName);
const getterClassName = `_${exampleGetterNameCapitalize}Getter`;
const getterGroupName = `${exampleGetterNameLower}Getter`;
const getterGroupName = `${exampleGetterNameLower}`;
const ignoreTemplates = getDataFromYaml("ignore");
const importTemplates = getDataFromYaml("import");
var generatedCode = "";
Expand Down

0 comments on commit c135ff0

Please sign in to comment.