Skip to content

Commit 5ec05b3

Browse files
new version, new images
1 parent 368f663 commit 5ec05b3

File tree

6 files changed

+32
-24
lines changed

6 files changed

+32
-24
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Create React Component
22

3-
Create React Component for VS Code
3+
Create React Component for VS Code
44

55
[![Version](https://vsmarketplacebadge.apphb.com/version/canducci.create-reactjs-components.svg)](https://vsmarketplacebadge.apphb.com/version-short/canducci.create-reactjs-components.svg)
66
[![Install](https://vsmarketplacebadge.apphb.com/installs/canducci.create-reactjs-components.svg)](https://vsmarketplacebadge.apphb.com/installs-short/canducci.create-reactjs-components.svg)
@@ -18,20 +18,28 @@ Paste the following command and press `Enter`:
1818
ext install canducci.create-reactjs-components
1919
```
2020

21-
2221
# Supported languages (file extensions)
2322

2423
- JavaScript (.js)
2524
- JavaScript React (.jsx)
25+
- Javascript Typescript (.tsx)
2626

2727
# Usage
2828

2929
In the Context Menu choose:
3030

31-
* React Arrow Function Component (js)
32-
* React Function Component (js)
33-
* React Arrow Function Component (jsx)
34-
* React Function Component (jsx)
31+
- React Arrow Function Component (js)
32+
- React Arrow Function Component (jsx)
33+
- React Arrow Function Component (tsx)
34+
- React Arrow Function Context (js)
35+
- React Arrow Function Context (jsx)
36+
- React Arrow Function Context (tsx)
37+
- React Function Component (js)
38+
- React Function Component (jsx)
39+
- React Function Component (tsx)
40+
- React Function Context (js)
41+
- React Function Context (jsx)
42+
- React Function Context (tsx)
3543

3644
where a component is created in the "components" folder
3745

@@ -42,4 +50,3 @@ where a component is created in the "components" folder
4250
### Example:
4351

4452
[![Gif](https://raw.githubusercontent.com/fulviocanducci/create-reactjs-components/master/images/example.gif)]()
45-

Sources.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ https://www.robinwieruch.de/react-function-component
33
// if (args == null) {
44
// args = { _fsPath: vscode.workspace.rootPath };
55
// }
6-
// let incomingpath: string = args._fsPath;
6+
// let incomingpath: string = args._fsPath;
7+
8+
https://code.visualstudio.com/api/references/contribution-points#contributes.views
9+
10+
https://code.visualstudio.com/api/references/contribution-points#contributes.commands

images/example.gif

61.5 KB
Loading

images/menu.png

16.5 KB
Loading

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "create-reactjs-components",
33
"displayName": "create-reactjs-components",
44
"description": "Create Component/Context Explorer Context",
5-
"version": "1.1.0",
5+
"version": "1.2.0",
66
"publisher": "canducci",
77
"icon": "images/logo-three.png",
88
"engines": {
@@ -27,17 +27,17 @@
2727
],
2828
"activationEvents": [
2929
"onCommand:canducci.arrowFunctionComponentJs",
30-
"onCommand:canducci.functionComponentJs",
3130
"onCommand:canducci.arrowFunctionComponentJsx",
31+
"onCommand:canducci.arrowFunctionComponentTs",
32+
"onCommand:canducci.arrowFunctionContextTs",
33+
"onCommand:canducci.functionComponentJs",
3234
"onCommand:canducci.functionComponentJsx",
35+
"onCommand:canducci.functionComponentTs",
36+
"onCommand:canducci.functionContextTs",
3337
"onCommand:canducci.createContextArrowFunctionJs",
34-
"onCommand:canducci.createContextFunctionJs",
3538
"onCommand:canducci.createContextArrowFunctionJsx",
3639
"onCommand:canducci.createContextFunctionJsx",
37-
"onCommand:canducci.arrowFunctionComponentTs",
38-
"onCommand:canducci.functionComponentTs",
39-
"onCommand:canducci.functionContextTs",
40-
"onCommand:canducci.arrowFunctionContextTs"
40+
"onCommand:canducci.createContextFunctionJs"
4141
],
4242
"main": "./out/extension.js",
4343
"contributes": {

src/test/suite/extension.test.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import * as assert from 'assert';
2-
3-
// You can import and use all API from the 'vscode' module
4-
// as well as import your extension to test it
52
import * as vscode from 'vscode';
6-
// import * as myExtension from '../../extension';
3+
//import * as myExtension from '../../extension';
74

85
suite('Extension Test Suite', () => {
9-
vscode.window.showInformationMessage('Start all tests.');
6+
vscode.window.showInformationMessage('Start all tests.');
107

11-
test('Sample test', () => {
12-
assert.equal(-1, [1, 2, 3].indexOf(5));
13-
assert.equal(-1, [1, 2, 3].indexOf(0));
14-
});
8+
test('Sample test', () => {
9+
assert.equal(-1, [1, 2, 3].indexOf(5));
10+
assert.equal(-1, [1, 2, 3].indexOf(0));
11+
});
1512
});

0 commit comments

Comments
 (0)