|
1 |
| -# nativescript-angular-snippets README |
| 1 | +# Nativescript: Angular HTML Snippets (vscode extension) |
2 | 2 |
|
3 |
| -This is the README for your extension "nativescript-angular-snippets". After writing up a brief description, we recommend including the following sections. |
| 3 | +**Updated for Nativescript v6.4.0 and Angular v9.0.0 release** |
4 | 4 |
|
5 |
| -## Features |
6 |
| - |
7 |
| -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. |
8 |
| - |
9 |
| -For example if there is an image subfolder under your extension project workspace: |
10 |
| - |
11 |
| -\!\[feature X\]\(images/feature-x.png\) |
12 |
| - |
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. |
14 |
| -
|
15 |
| -## Requirements |
16 |
| - |
17 |
| -If you have any requirements or dependencies, add a section describing those and how to install and configure them. |
18 |
| - |
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. |
| 5 | +This extension adds all HTML Nativescript UI Components, Layouts and Gestures snippets. |
33 | 6 |
|
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 macOS or `Ctrl+\` on Windows and Linux) |
57 |
| -* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) |
58 |
| -* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) 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/) |
| 7 | +## Features |
64 | 8 |
|
65 |
| -**Enjoy!** |
| 9 | +* Default syntax - Plain Nativescript tag. |
| 10 | +* Property syntax - Includes all properties from Angular Nativescript [documentation]. |
| 11 | +* Complete syntax - Includes all properties, all events and documentation. |
| 12 | +* Layout snippets |
| 13 | +* Gesture snippets |
| 14 | +* System Icon snippets |
| 15 | + |
| 16 | +### Description |
| 17 | + |
| 18 | +| | snippet | entered by user | output | description | |
| 19 | +| --------------- | ---------------- | --------- | -------------------------- | -----------------------------------------| |
| 20 | +| default | `ns-button` | `nsbutt` | `<Button></Button>` | plain | |
| 21 | +| property (prop) | `ns-button-prop` | `nsbutpr` | with *prop | With all properties | |
| 22 | +| complete (comp) | `ns-button-comp` | `nsbu-c` | with *prop, *events, *docs | All properties, events and documentation | |
| 23 | +| layout snippets | `ns-dock-layout-snippet-2` | `nsdocnip2` | [snippet 2] | Sample snippet from [site docs]. | |
| 24 | +| gestures | `ns-tap` | `nstap` | `(tap)=""` | Gesture Snippets | |
| 25 | +| setting icon | `ns-icon-stop` | `nsicost` | `14` | [Setting Icon] snippets | |
| 26 | + |
| 27 | +For complete snippet reference and more examples [check this]. |
| 28 | + |
| 29 | +### `ns-button`: In Action |
| 30 | + |
| 31 | +#### Default output |
| 32 | + |
| 33 | +``` html |
| 34 | +<Button></Button> |
| 35 | +``` |
| 36 | + |
| 37 | +#### Property output |
| 38 | + |
| 39 | +``` html |
| 40 | +<Button text=""></Button> |
| 41 | +``` |
| 42 | + |
| 43 | +#### Complete output |
| 44 | + |
| 45 | +``` html |
| 46 | +<Button |
| 47 | + text="string" |
| 48 | + (tap)="" |
| 49 | + (loaded)="" |
| 50 | + (unloaded)="" |
| 51 | + (layoutChanged)=""> |
| 52 | +</Button> |
| 53 | +<!-- |
| 54 | +Properties |
| 55 | +NAME TYPE DESCRIPTION |
| 56 | +text string Gets or sets the label of the button. |
| 57 | +
|
| 58 | +Events |
| 59 | +NAME DESCRIPTION |
| 60 | +tap Emitted when the button is tapped. |
| 61 | +loaded Emitted when the view is loaded. |
| 62 | +unloaded Emitted when the view is unloaded. |
| 63 | +layoutChanged Emitted when the layout bounds of a view changes due to layout processing. |
| 64 | + --> |
| 65 | +``` |
| 66 | + |
| 67 | +### `ns-dock-layout-snippet-2`: In Action |
| 68 | + |
| 69 | +``` html |
| 70 | +<DockLayout width="210" height="210" backgroundColor="lightgray" stretchLastChild="true"> |
| 71 | + <Label text="left" dock="left" backgroundColor="red"></Label> |
| 72 | + <Label text="top" dock="top" backgroundColor="green"></Label> |
| 73 | + <Label text="right" dock="right" backgroundColor="blue"></Label> |
| 74 | + <Label text="bottom" dock="bottom" backgroundColor="yellow"></Label> |
| 75 | +</DockLayout> |
| 76 | +``` |
| 77 | + |
| 78 | +### Demo |
| 79 | + |
| 80 | +HTML snippet `ns-text-field` in action; _default_, _property_ (prop) and _complete_ (comp) syntax demo. |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +### Snippets: User Interface > Layouts |
| 85 | + |
| 86 | +* ns-absolute-layout |
| 87 | +* ns-dock-layout |
| 88 | +* ns-grid-layout |
| 89 | +* ns-stack-layout |
| 90 | +* ns-wrap-layout |
| 91 | +* ns-flexbox-layout |
| 92 | + |
| 93 | +### Snippets: User Interface > Components |
| 94 | + |
| 95 | +* ns-actionbar |
| 96 | +* ns-actionbarextension |
| 97 | +* ns-actionitem |
| 98 | +* ns-navigationbutton |
| 99 | +* ns-activityindicator |
| 100 | +* ns-button |
| 101 | +* ns-datepicker |
| 102 | +* ns-formattedstring |
| 103 | +* ns-htmlview |
| 104 | +* ns-image |
| 105 | +* ns-label |
| 106 | +* ns-listpicker |
| 107 | +* ns-listview |
| 108 | +* ns-progress |
| 109 | +* ns-scroll-view |
| 110 | +* ns-search-bar |
| 111 | +* ns-segmented-bar |
| 112 | +* ns-segmented-bar-item |
| 113 | +* ns-slider |
| 114 | +* ns-switch |
| 115 | +* ns-bottom-navigation |
| 116 | +* ns-tab-strip |
| 117 | +* ns-tab-strip-item |
| 118 | +* ns-tab-content-item |
| 119 | +* ns-tabs |
| 120 | +* ns-tab-view |
| 121 | +* ns-tab-view-item |
| 122 | +* ns-text-field |
| 123 | +* ns-text-view |
| 124 | +* ns-time-picker |
| 125 | +* ns-web-view |
| 126 | + |
| 127 | +### Snippets: Gestures |
| 128 | + |
| 129 | +| Snippet | Output | |
| 130 | +|----------------|------------------| |
| 131 | +| `ns-tap` | `(tap)=""` | |
| 132 | +| `ns-doubleTap` | `(doubleTap)=""` | |
| 133 | +| `ns-longPress` | `(longPress)=""` | |
| 134 | +| `ns-swipe` | `(swipe)=""` | |
| 135 | +| `ns-pan` | `(pan)=""` | |
| 136 | +| `ns-pinch` | `(pinch)=""` | |
| 137 | +| `ns-rotation` | `(rotation)=""` | |
| 138 | +| `ns-touch` | `(touch)=""` | |
| 139 | + |
| 140 | +### Snippets: Setting Icons |
| 141 | + |
| 142 | +| Snippet | Output | |
| 143 | +|------------------|--------| |
| 144 | +|`ns-icon-action` | `9` | |
| 145 | +|`ns-icon-undo` | `21` | |
| 146 | + |
| 147 | +#### List |
| 148 | + |
| 149 | +| ICON | VALUE | ICON | VALUE | |
| 150 | +|---------------|-------|-------------|-------| |
| 151 | +| Done | 0 | Search | 12 | |
| 152 | +| Cancel | 1 | Refresh | 13 | |
| 153 | +| Edit | 2 | Stop | 14 | |
| 154 | +| Save | 3 | Camera | 15 | |
| 155 | +| Add | 4 | Trash | 16 | |
| 156 | +| FlexibleSpace | 5 | Play | 17 | |
| 157 | +| FixedSpace | 6 | Pause | 18 | |
| 158 | +| Compose | 7 | Rewind | 19 | |
| 159 | +| Reply | 8 | FastForward | 20 | |
| 160 | +| Action | 9 | Undo | 21 | |
| 161 | +| Organize | 10 | Redo | 22 | |
| 162 | +| Bookmarks | 11 | PageCurl | 23 | |
| 163 | + |
| 164 | +Reference: https://docs.nativescript.org/angular/ui/action-bar#setting-icons |
| 165 | + |
| 166 | +## Installation |
| 167 | + |
| 168 | + 1. Install Visual Studio Code v1.30.0 or higher |
| 169 | + 1. Launch Code |
| 170 | + 1. From the command palette `Ctrl+Shift+P` (Windows, Linux) or `Cmd+Shift+P` (OSX) |
| 171 | + 1. Select Install Extensions |
| 172 | + 1. Choose **Nativescript: Angular HTML Snippets** by _ElecTreeFrying_ |
| 173 | + 1. Reload Visual Studio Code |
| 174 | + |
| 175 | +## Changelog |
| 176 | + |
| 177 | +See [CHANGELOG] for more information. |
| 178 | + |
| 179 | +## Contributing |
| 180 | + |
| 181 | +* File bugs, feature requests in [GitHub Issues]. |
| 182 | +* Leave a review on [Visual Studio Marketplace]. |
| 183 | + |
| 184 | +## Related |
| 185 | + |
| 186 | +[More extensions of mine] |
| 187 | + |
| 188 | +## License |
| 189 | + |
| 190 | +MIT |
| 191 | + |
| 192 | +[Link]: https://github.com/ElecTreeFrying/nativescript-angular-html-snippets/blob/master/reference.md |
| 193 | +[check this]: https://github.com/ElecTreeFrying/nativescript-angular-html-snippets/blob/master/reference.md |
| 194 | +[documentation]: https://docs.nativescript.org/angular/start/introduction |
| 195 | +[Setting Icon]: https://docs.nativescript.org/angular/ui/action-bar#setting-icons |
| 196 | +[snippet 2]: https://docs.nativescript.org/angular/ui/layouts/layout-containers#docklayout |
| 197 | +[site docs]: https://docs.nativescript.org/angular/ui/layouts/layout-containers#docklayout |
| 198 | + |
| 199 | +[CHANGELOG]: https://marketplace.visualstudio.com/items/ElecTreeFrying.nativescript-angular-html-snippets/changelog |
| 200 | +[Github Issues]: https://github.com/ElecTreeFrying/nativescript-angular-html-snippets/issues |
| 201 | +[Visual Studio Marketplace]: https://marketplace.visualstudio.com/items?itemName=ElecTreeFrying.nativescript-angular-html-snippets&ssr=false#review-details |
| 202 | +[More extensions of mine]: https://marketplace.visualstudio.com/publishers/ElecTreeFrying |
0 commit comments