Skip to content

Commit 8c4d6b1

Browse files
Adding uilib snippet extension (not published) (#1828)
* Adding uilib snippet extension (not published) * moving snippets generator script and command to main lib * rename file * Adding license * removing file * uilib to rnuilib * Update package.json Co-authored-by: Ethan Sharabi <[email protected]> * updating snippets * renaming 'rnuilib-snippets' and moving to extensions directory Co-authored-by: Ethan Sharabi <[email protected]>
1 parent e87cfd2 commit 8c4d6b1

File tree

14 files changed

+693
-0
lines changed

14 files changed

+693
-0
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
example/
22
docs/
3+
extensions/
34
node_modules/
45
.npmignore
56
.watchmanconfig
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Set default behavior to automatically normalize line endings.
2+
* text=auto
3+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
*.vsix
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
vsc-extension-quickstart.md
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Change Log
2+
3+
All notable changes to the "rnuilib-snippets" extension will be documented in this file.
4+
5+
6+
## [1.0.0]
7+
8+
- Initial release of rnuilib-snippets extension.

extensions/rnuilib-snippets/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Wix.com
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.

extensions/rnuilib-snippets/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# rnuilib-snippets
2+
3+
[![Version](https://vsmarketplacebadge.apphb.com/version-short/jundat95.rnuilib-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=jundat95.rnuilib-snippets)
4+
[![Install](https://vsmarketplacebadge.apphb.com/installs-short/jundat95.rnuilib-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=jundat95.rnuilib-snippets)
5+
[![Ratings](https://vsmarketplacebadge.apphb.com/rating-short/jundat95.rnuilib-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=jundat95.rnuilib-snippets)
6+
7+
This extension provides code snippets for `react-native-ui-lib`'s components for Vs Code editor.
8+
It supports JavaScript and TypeScript, ReactJavaScript and ReactTypeScript.
9+
10+
## How to use
11+
12+
After installing this extension you can generate a code snippet by simply typing a component's name (camelCase) and see the option in the suggestion tooltip.
13+
Using the tab key you can navigate through the fields to enter your values.
14+
15+
Also, type `uilib` and get the uilib import - `import {} from 'react-native-ui-lib'` - to import the components.
16+
17+
See video:
18+
19+
<p align="center">
20+
<img src="https://github.com/wix/react-native-ui-lib/blob/master/extensions/rnuilib-snippets/assets/usage.gif" alt="extension usage" />
21+
</p>
22+
23+
## Requirements
24+
25+
This extension generate code for `react-native-ui-lib`'s components. `react-native-ui-lib` should be installed as a dependency to your projects. See: https://github.com/wix/react-native-ui-lib#installing
26+
27+
28+
**Enjoy!**
3.86 KB
Loading
251 KB
Loading

extensions/rnuilib-snippets/index.tsx

Whitespace-only changes.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "rnuilib-snippets",
3+
"displayName": "React Native UILIB Snippets",
4+
"description": "Code snippets for react-native-ui-lib components",
5+
"author": "Inbal Tish <[email protected]>",
6+
"publisher": "wix",
7+
"license": "MIT",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/wix/react-native-ui-lib"
11+
},
12+
"icon": "assets/icon.png",
13+
"version": "1.0.0",
14+
"engines": {
15+
"vscode": "^1.64.0"
16+
},
17+
"keywords": [
18+
"react-native",
19+
"snippets",
20+
"javascript",
21+
"typescript"
22+
],
23+
"categories": [
24+
"Snippets"
25+
],
26+
"contributes": {
27+
"snippets": [
28+
{
29+
"language": "typescript",
30+
"path": "./snippets/snippets.code-snippets"
31+
},
32+
{
33+
"language": "typescriptreact",
34+
"path": "./snippets/snippets.code-snippets"
35+
},
36+
{
37+
"language": "javascript",
38+
"path": "./snippets/snippets.code-snippets"
39+
},
40+
{
41+
"language": "javascriptreact",
42+
"path": "./snippets/snippets.code-snippets"
43+
}
44+
]
45+
}
46+
}

0 commit comments

Comments
 (0)