Skip to content

Commit b943827

Browse files
committed
first commit
0 parents  commit b943827

18 files changed

+646
-0
lines changed

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
patreon: equiman
2+
custom: ["https://paypal.me/equiman/3", "https://www.buymeacoffee.com/equiman"]

.github/social/preview.png

41.1 KB
Loading

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
out
2+
node_modules
3+
.vscode-test/
4+
*.vsix
5+
*.log
6+
.DS_Store
7+
.test

.vscode/launch.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": [
10+
"--extensionDevelopmentPath=${workspaceFolder}"
11+
]
12+
}
13+
]
14+
}

.vscode/settings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cSpell.words": ["buymeacoffee", "deinsoftware", "Equiman", "volta"],
3+
"markdownlint.config": {
4+
"MD024": { "siblings_only": true }
5+
}
6+
}

.vscodeignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.gitignore
3+
CHANGELOG.md
4+
.test/**

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
<!-- http://keepachangelog.com/en/1.0.0/
4+
Added for new features.
5+
Changed for changes in existing functionality.
6+
Deprecated for once-stable features removed in upcoming releases.
7+
Removed for deprecated features removed in this release.
8+
Fixed for any bug fixes.
9+
Security to invite users to upgrade in case of vulnerabilities.
10+
-->
11+
12+
## [1.0.0] - 2022/04/20
13+
14+
### Added
15+
16+
- constants and properties snippets

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 dein Software
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# Const & Props Snippets
2+
3+
[![Version](https://vsmarketplacebadge.apphb.com/version/deinsoftware.const-props-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=deinsoftware.const-props-snippets)
4+
[![Installs](https://vsmarketplacebadge.apphb.com/installs/deinsoftware.const-props-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=deinsoftware.const-props-snippets)
5+
[![Ratings](https://vsmarketplacebadge.apphb.com/rating/deinsoftware.const-props-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=deinsoftware.const-props-snippets)
6+
[![license](https://img.shields.io/github/license/deinsoftware/vscode-const-props-snippets)](LICENSE.md)
7+
[![Open in VS Code](https://img.shields.io/static/v1?logo=visualstudiocode&label=&message=Open%20in%20Visual%20Studio%20Code&labelColor=2c2c32&color=007acc&logoColor=007acc)](https://open.vscode.dev/deinsoftware/vscode-const-props-snippets)
8+
9+
![Const & Props](https://raw.githubusercontent.com/deinsoftware/vscode-const-props-snippets/main/.github/social/preview.png 'Const & Props Snippets')
10+
11+
The quick and easy way to create and use Const & Props with [VS Code](https://code.visualstudio.com/).
12+
13+
## Menu
14+
15+
- [Installation](#installation)
16+
- [Quick Launch](#quick-launch)
17+
- [Extension Manager](#extension-manager)
18+
- [Marketplace](#marketplace)
19+
- [Supported Languages](#supported-languages)
20+
- [Snippets](#snippets)
21+
- [Variables](#variables)
22+
- [Destructuring](#destructuring)
23+
- [Object Elements](#object-elements)
24+
- [JSON Elements](#json-elements)
25+
- [React Components](#react-components)
26+
- [About](#about)
27+
28+
---
29+
30+
## Installation
31+
32+
### Quick Launch
33+
34+
Open the quick launch with <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>P</kbd> (Win/Linux) or <kbd>cmd</kbd>+<kbd>shift</kbd>+<kbd>P</kbd> (macOS).
35+
36+
Paste the following command and press `Enter`:
37+
38+
```shell
39+
ext install deinsoftware.const-props-snippets
40+
```
41+
42+
### Extension Manager
43+
44+
Open the extension manager with <kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>X</kbd> (Win/Linux) or <kbd>cmd</kbd>+<kbd>shift</kbd>+<kbd>X</kbd> (macOS), search for `Const & Props Snippets` and click on `[Install]` button.
45+
46+
### Marketplace
47+
48+
[Const & Props Snippets](https://marketplace.visualstudio.com/items?itemName=deinsoftware.const-props-snippets)
49+
50+
[Back to menu](#menu)
51+
52+
---
53+
54+
## Supported Languages
55+
56+
| Language | Extension |
57+
| ---------------- | --------- |
58+
| JavaScript | `.js` |
59+
| TypeScript | `.ts` |
60+
| JavaScript React | `.jsx` |
61+
| TypeScript React | `.tsx` |
62+
| Vue | `.vue` |
63+
| JSON | `.json` |
64+
| JSONC | `.jsonc` |
65+
| JSON5 | `.json5` |
66+
67+
[Back to menu](#menu)
68+
69+
---
70+
71+
## Snippets
72+
73+
Below is a list of all available snippets and the triggers of each one. The **** means the `TAB` key and `` the final cursor position.
74+
75+
### Variables
76+
77+
| Trigger | Description | Result JS | Result TS |
78+
| -------: | ---------------------------- | -------------------- | ------------------------------------------------- |
79+
| `cv→` | const variable | `const name = █` | `const name = █` |
80+
| `cvt→` | const variable type | | `const name: type = █` |
81+
| `cvm→` | const variable multiple type | | <code>const name: (type &#124; type) = █</code> |
82+
| `cs→` | const string | `const name = '█'` | `const name: string = '█'` |
83+
| `cn→` | const number | `const name = 0█` | `const name: number = 0█` |
84+
| `cb→` | const boolean | `const name = true█` | `const name: boolean = true█` |
85+
| `co→` | const object | `const name = {█}` | `const name = {█}` |
86+
| `coi→` | const object interface | | `const name: Interface = {█}` |
87+
| `ca→` | const array | `const name = [█]` | `const name = [█]` |
88+
| `cat→` | const array type | | `const name: type = [█]` |
89+
| `cam→` | const array multiple type | | <code>const name: (type &#124; type) = []</code> |
90+
91+
### Destructuring
92+
93+
| Trigger | Description | Result JS/TS |
94+
| -------: | ------------------------------- | ------------------------------------- |
95+
| `cod→` | const object dest | `const {prop, prop} = name█` |
96+
| `codr→` | const object dest with rest | `const {prop, prop, ...rest} = name█` |
97+
| `cad→` | const array dest | `const [prop, prop] = name█` |
98+
| `cadr→` | const array dest with rest | `const [prop, prop, ...rest] = name█` |
99+
| `pd→` | parameter object dest | `{prop, prop█}` |
100+
| `pdr→` | parameter object dest with rest | `{prop, prop, ...rest█}` |
101+
102+
### Object Elements
103+
104+
| Trigger | Description | Result JS/TS |
105+
| -------: | ---------------------------- | ----------------------------------------------------- |
106+
| `oev→` | obj element variable | `key: value,█` |
107+
| `oes→` | obj element string | `key: 'value',█` |
108+
| `oen→` | obj element number | `key: number,█` |
109+
| `oeb→` | obj element boolean | `key: true,█` |
110+
| `oeo→` | obj element object | `key: { element },█` |
111+
| `oeom→` | obj element object multiline | <code>key: {<br/>&nbsp;&nbsp;element, <br/>},█</code> |
112+
| `oea→` | obj element array | `key: [ value ],█` |
113+
| `oeam→` | obj element array multiline | <code>key: [<br/>&nbsp;&nbsp;value, <br/>],█</code> |
114+
115+
### JSON Elements
116+
117+
| Trigger | Description | Result JS/TS |
118+
| -------: | ----------------------------- | ------------------------------------------------------- |
119+
| `jes→` | json element string | `key: 'value',█` |
120+
| `jev→` | json element variable | `key: value,█` |
121+
| `jen→` | json element number | `key: number,█` |
122+
| `jeb→` | json element boolean | `key: true,█` |
123+
| `jeo→` | json element object | `key: { element }█` |
124+
| `jeom→` | json element object multiline | <code>key: {<br/>&nbsp;&nbsp;element , <br/>},█</code> |
125+
| `jea→` | json element array | `key: [ value ],█` |
126+
| `jeam→` | json element array multiline | <code>key: [<br/>&nbsp;&nbsp;value , <br/>],█</code> |
127+
128+
> ℹ️ Only available in `.json`, `.jsonc` and `.json5` files
129+
130+
### React Components
131+
132+
| Trigger | Description | Result JSX/TSX |
133+
| -------: | ---------------------------- | -------------- |
134+
| `rp→` | react property | `prop={prop}█` |
135+
| `rps→` | react property string | `prop='█'` |
136+
| `rpn→` | react property number | `prop={0}█` |
137+
| `rpb→` | react property boolean | `prop={true}█` |
138+
| `rpo→` | react property object | `prop={{█}}` |
139+
| `rpa→` | react property array | `prop={[█]}` |
140+
141+
> ℹ️ Only available in `jsx` or `tsx`
142+
143+
[Back to menu](#menu)
144+
145+
---
146+
147+
## About
148+
149+
### Built With
150+
151+
- [VS Code](https://code.visualstudio.com/) - Code editing redefined.
152+
- [Figma](https://www.figma.com/) - The collaborative interface design tool.
153+
154+
### Contributing
155+
156+
Please read [CONTRIBUTING](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
157+
158+
### Versioning
159+
160+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [Const & Props Snippets](https://github.com/deinsoftware/const-props-snippets/tags) on GitHub.
161+
162+
### Authors
163+
164+
- **Camilo Martinez** [[Equiman](http://stackoverflow.com/story/equiman)]
165+
166+
See also the list of [contributors](https://github.com/deinsoftware/const-props-snippets/contributors) who participated in this project.
167+
168+
### Sponsors
169+
170+
If this project helps you, consider buying me a cup of coffee.
171+
172+
[![paypal](https://img.shields.io/badge/-PayPal-gray?style=flat&labelColor=00457C&logo=paypal&logoColor=white&link=https://paypal.me/equiman/3)](https://paypal.me/equiman/3)
173+
[![patreon](https://img.shields.io/badge/-Patreon-gray?style=flat&labelColor=052d49&logo=patreon&logoColor=F96854&link=https://patreon.com/equiman)](https://patreon.com/equiman)
174+
[![buymeacoffee](https://img.shields.io/badge/-Buy%20Me%20A%20Coffee-gray?style=flat&labelColor=FF813F&logo=buy-me-a-coffee&logoColor=white&link=https://buymeacoff.ee/equiman)](https://www.buymeacoffee.com/equiman)
175+
176+
### License
177+
178+
This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.
179+
180+
[Back to menu](#menu)

images/dark-icon.png

4.19 KB
Loading

images/light-icon.png

3.89 KB
Loading

0 commit comments

Comments
 (0)