File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff 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+
Original file line number Diff line number Diff line change 11import * as vscode from 'vscode' ;
22import * as fs from 'fs' ;
33
4+ function createFolderComponents ( ) { }
5+
46export 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
1618export 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 ;
You can’t perform that action at this time.
0 commit comments