Skip to content

Commit a86c09e

Browse files
readme
1 parent f4ea676 commit a86c09e

File tree

5 files changed

+35
-5
lines changed

5 files changed

+35
-5
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,35 @@ In the Context Menu choose:
4848

4949
### Menu:
5050

51-
[![Image](https://raw.githubusercontent.com/fulviocanducci/create-reactjs-components/master/images/menu.png)]()
51+
[![Image](https://raw.githubusercontent.com/fulviocanducci/fulviocanducci/master/images/canducci.create-reactjs-components.menu.png)]()
5252

53-
[![Image](https://raw.githubusercontent.com/fulviocanducci/create-reactjs-components/master/images/ctrlp.png)]()
53+
---
54+
55+
[![Image](https://raw.githubusercontent.com/fulviocanducci/fulviocanducci/master/images/canducci.create-reactjs-components.ctrlp.png)]()
56+
57+
### Usage:
58+
59+
In the box provided, type the name of the component, which may vary as follows:
60+
61+
1. A simple name, example: counter
62+
63+
A component or context is created respectively, the name entered is the folder and within that folder an `index.js|jsx|tsx`.
64+
65+
2. Several names separated by commas, example: counter, header, footer
66+
67+
A component or context is created respectively, the names entered are separated into folders and within each folder an `index.js|jsx|tsx`.
68+
69+
3. Names separated by periods are compound words, example: `app.web`, `header.counter`, etc.
70+
71+
If the name (s) are a period separating it means that your initials will be in uppercase, example: `AppWeb`, `HeaderCounter` and the others name follows the same PascalCase nomenclature, exemplo: `Counter`, `App`, etc.
72+
73+
4. Name with numeric initials will not be accepted
74+
Example names: 1Header, 2Web are not accepted
75+
76+
### Example:
77+
78+
[![Image](https://raw.githubusercontent.com/fulviocanducci/fulviocanducci/master/images/caducci.create-reactjs-componente.inputbox.png)]()
79+
80+
---
81+
82+
[![Image](https://raw.githubusercontent.com/fulviocanducci/fulviocanducci/master/images/caducci.create-reactjs-componente.filecreated.png)]()

images/ctrlp.png

-22 KB
Binary file not shown.

images/menu.png

-38.3 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"engines": {
99
"vscode": "^1.48.0"
1010
},
11+
"license": "MIT",
1112
"galleryBanner": {
1213
"theme": "dark",
1314
"color": "#3f79a5"

src/utils/operations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ const openFile = (file: string) => {
5252

5353
const optionsFileName = (title: string): vscode.InputBoxOptions => {
5454
return {
55-
prompt: `Enter the ${title.toLowerCase()} name: `,
56-
placeHolder: `${title} name`,
55+
prompt: `Enter the name or names separated by commas: `,
56+
placeHolder: `${title}: enter name or names separated by commas`,
5757
ignoreFocusOut: true,
5858
valueSelection: [-1, -1],
5959
};
6060
};
6161

6262
const multiNames = (name: string): Array<string> => {
63-
const names: Array<string> = name.split(new RegExp('[,;]')).map((v) => pascalCase(v.trim()));
63+
const names: Array<string> = name.split(',').map((v) => pascalCase(v.trim()));
6464
return names;
6565
};
6666

0 commit comments

Comments
 (0)