Skip to content

Commit 4ebf13e

Browse files
committed
Update readme
1 parent 28da59c commit 4ebf13e

File tree

4 files changed

+36
-81
lines changed

4 files changed

+36
-81
lines changed

README.md

+29-56
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,38 @@
1-
# uruit-react-snippets README
1+
# React Snippets for Visual Studio Code
22

3-
This is the README for your extension "uruit-react-snippets". After writing up a brief description, we recommend including the following sections.
3+
Extension for Visual Studio Code to add snippets for React in ECMA Script 6.
44

5-
## Features
5+
![Extension demo](./images/snippet-demo.gif)
66

7-
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
7+
## Usage
8+
Type the snippet prefix and press enter.
89

9-
For example if there is an image subfolder under your extension project workspace:
10+
```javascript
11+
u-ci // console.info
12+
u-ctor // class constructor
13+
u-impt // import module statement
14+
u-rfc // functional component (stateless)
15+
u-rcc // class component (statefull)
16+
u-it // Jest test `it`
17+
u-desc // Jest test `describe`
18+
u-suite // Jest test suite (with imports)
19+
u-pt // Generic PropType
20+
u-pts // String PropType
21+
u-ptn // Number PropType
22+
u-ptb // Bool PropType
23+
u-ptf // Func PropType
24+
u-actions // Redux actions
25+
u-action // Redux action
26+
```
1027

11-
\!\[feature X\]\(images/feature-x.png\)
28+
## Installation
1229

13-
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
30+
Install through VS Code extensions. Search for UruIT React Snippets
1431

15-
## Requirements
32+
[Visual Studio Code Market Place: UruIT React Snippets]()
1633

17-
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
34+
Can also be installed using
1835

19-
## Extension Settings
20-
21-
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22-
23-
For example:
24-
25-
This extension contributes the following settings:
26-
27-
* `myExtension.enable`: enable/disable this extension
28-
* `myExtension.thing`: set to `blah` to do something
29-
30-
## Known Issues
31-
32-
Calling out known issues can help limit users opening duplicate issues against your extension.
33-
34-
## Release Notes
35-
36-
Users appreciate release notes as you update your extension.
37-
38-
### 1.0.0
39-
40-
Initial release of ...
41-
42-
### 1.0.1
43-
44-
Fixed issue #.
45-
46-
### 1.1.0
47-
48-
Added features X, Y, and Z.
49-
50-
-----------------------------------------------------------------------------------------------------------
51-
52-
## Working with Markdown
53-
54-
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
55-
56-
* Split the editor (`Cmd+\` on OSX or `Ctrl+\` on Windows and Linux)
57-
* Toggle preview (`Shift+CMD+V` on OSX or `Shift+Ctrl+V` on Windows and Linux)
58-
* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (OSX) to see a list of Markdown snippets
59-
60-
### For more information
61-
62-
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63-
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
64-
65-
**Enjoy!**
36+
```bash
37+
ext install uruit-react-snippets
38+
```

images/snippet-demo.gif

4.4 MB
Loading

snippets/snippets.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
"import PropTypes from 'prop-types';",
3131
"import styles from './$1.scss';",
3232
"",
33-
"export default function $1({ prop }) {",
33+
"export default function $1({ $2 }) {",
3434
"\treturn (",
35-
"\t\t$2",
35+
"\t\t$0",
3636
"\t);",
3737
"}",
3838
"",
3939
"$1.propTypes = {",
40-
"",
40+
"\t$2: PropTypes.$3.isRequired",
4141
"};"
4242
],
4343
"description": "Stateless component"
@@ -145,7 +145,8 @@
145145
"export default function* watch$3() {",
146146
"\tyield takeLatest($1, $4);",
147147
"}"
148-
]
148+
],
149+
"description": "Redux actions"
149150
},
150151
"Redux action": {
151152
"prefix": "u-action",
@@ -154,6 +155,7 @@
154155
"export const $2 = () => ({",
155156
"\ttype: $1",
156157
"});"
157-
]
158+
],
159+
"description": "Redux action"
158160
}
159161
}

vsc-extension-quickstart.md

-20
This file was deleted.

0 commit comments

Comments
 (0)