Skip to content

Commit aff0c77

Browse files
gif
1 parent cc0c430 commit aff0c77

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,16 @@ ext install canducci.create-reactjs-components
2626

2727
# Usage
2828

29+
In the Context Menu choose:
30+
31+
* React Arrow Function Component (js)
32+
* React Function Component (js)
33+
* React Arrow Function Component (jsx)
34+
* React Function Component (jsx)
35+
36+
where a component is created in the "components" folder
37+
38+
### Example:
39+
40+
[![Image](https://raw.githubusercontent.com/fulviocanducci/create-reactjs-components/master/images/menu.png)]()
41+

images/example.gif

214 KB
Loading

src/utils/operations.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import * as vscode from 'vscode';
22
import * as fs from 'fs';
33

4+
function createFolderComponents() {}
5+
46
export function getProjetctRoot(): string {
57
return (vscode.workspace.workspaceFolders as any)[0].uri.fsPath;
68
}
@@ -15,7 +17,7 @@ export function existsDir(dir: string): boolean {
1517

1618
export function createDir(dir: string): boolean {
1719
try {
18-
fs.mkdirSync(dir);
20+
fs.mkdirSync(dir, { recursive: true });
1921
return true;
2022
} catch (error) {}
2123
return false;

0 commit comments

Comments
 (0)