Skip to content

Commit 81c591a

Browse files
author
sw-yx
committed
omit vsix
1 parent b4c81db commit 81c591a

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
2-
.DS_Store
2+
.DS_Store
3+
*.vsix

README.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This extension contains code snippets for React with Typescript (optionally, wit
66

77
It contains no class component APIs, assumes you use synthetic default imports, has hooks and subjectively better prop scaffolding.
88

9-
It does a bit more based on the principle that it is easier to delete than to type, and so that we have just 3 easy to remember snippets.
9+
It does a bit more based on the principle that it is easier to delete than to type, and so that we have just 3 easy to remember snippets: `rfc`, `rhc`, `rsc`.
1010

1111
## Installation
1212

@@ -39,12 +39,11 @@ Below is a list of all available snippets and the triggers of each one. The **
3939
"React Function Component": {
4040
"prefix": "rfc",
4141
"body": [
42-
"export type ${1:IApp}Props = {$2",
43-
"}",
44-
"",
45-
"const $1: React.FC<$1Props> = ({ children }) => {",
42+
"export type $1Props = { $2: $3 }",
43+
"export const $1: React.FC<$1Props> = ({ $2 }) => {",
44+
" console.log({ $2 })",
4645
" return (",
47-
" ${0}",
46+
" $0",
4847
" )",
4948
"};",
5049
"",
@@ -55,11 +54,10 @@ Below is a list of all available snippets and the triggers of each one. The **
5554
"React Hooks Component": {
5655
"prefix": "rhc",
5756
"body": [
58-
"export type ${1:IApp}Props = {$2",
59-
"}",
60-
"",
61-
"const $1: React.FC<$1Props> = ({ children }) => {",
62-
" const [${3}, set${3/(.*)/${3:/capitalize}/}] = React.useState($4);",
57+
"export type $1Props = { $2: $3 }",
58+
"export const $1: React.FC<$1Props> = ({ $2 }) => {",
59+
" console.log({ $2 })",
60+
" const [${4}, set${4/(.*)/${4:/capitalize}/}] = React.useState($5);",
6361
" React.useEffect(() => {}, [])",
6462
" return (",
6563
" ${0}",
@@ -76,10 +74,11 @@ Below is a list of all available snippets and the triggers of each one. The **
7674
"const StyledDiv = styled('div')`",
7775
" border: 1px solid red",
7876
"`",
79-
"export type ${1:IApp}Props = {$2",
80-
"}",
81-
"",
82-
"const $1: React.FC<$1Props> = ({ children }) => {",
77+
"export type $1Props = { $2: $3 }",
78+
"export const $1: React.FC<$1Props> = ({ $2 }) => {",
79+
" console.log({ $2 })",
80+
" const [${4}, set${4/(.*)/${4:/capitalize}/}] = React.useState($5);",
81+
" React.useEffect(() => {}, [])",
8382
" return (",
8483
" <StyledDiv>",
8584
" ${0}",
@@ -94,6 +93,10 @@ Below is a list of all available snippets and the triggers of each one. The **
9493
}
9594
```
9695

96+
## Publishing
97+
98+
`vsce package`
99+
97100
## License
98101

99102
MIT
-15.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)