Skip to content

Commit

Permalink
2.2.1
Browse files Browse the repository at this point in the history
- Fixed an error with incorrect processing `.` `-` `_` in the name of the component.
  • Loading branch information
dsbasko committed Feb 3, 2023
1 parent f335e3c commit a44c050
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
Component Creator is an [open-source](https://github.com/dsbasko/component-creator) [extension](https://badgen.net/vs-marketplace/v/dsbasko.create-component-helper) for [Visual Studio Code](https://code.visualstudio.com), designed to easily creating components based on yours templates.


## Whats new in 2.2?
## Whats new in 2.2.1?

- Added a mask `{{concat}}` in the file name, indicating append buffer from template to this file;
- Added the ability to overwrite or ignore files that already exist in the selected path;
- Added Russian translation. You can choose in the extension settings.
- Fixed an error with incorrect processing `.` `-` `_` in the name of the component.


## Features
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": "create-component-helper",
"displayName": "Component Creator",
"description": "🧬 Create file structure based on your templates",
"version": "2.2.0",
"version": "2.2.1",
"engines": { "vscode": "^1.70.0" },
"icon": "assets/icon.png",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions src/handler/component-add.handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ export class ComponentAddHandle {
const normalizedComponentName = componentName.replace('\\\\', '/');
if (normalizedComponentName.includes('/')) {
const parseComponent = parse(normalizedComponentName);
this.componentName = parseComponent.base;
this.componentName = parseComponent.base.replace(/[-_.]/g, ' ');
this.contextPath = join(this.contextPath, parseComponent.dir);
return this;
return this;
}

this.componentName = normalizedComponentName;
this.componentName = normalizedComponentName.replace(/[-_.]/g, ' ');
return this;
};

Expand Down

0 comments on commit a44c050

Please sign in to comment.