Skip to content

Commit 9ed9885

Browse files
Merge pull request #1 from Esri/raluca/updateReadme
Update readme and html code snippet version to 4.12
2 parents 6b86bed + ad75d95 commit 9ed9885

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# arcgis-jsapi-snippets README
22

3-
Collection of Visual Studio Code snippets for common code patterns and a Visual Studio Code extension (in the extension folder) that you can view in [Visual Studio Code marketplace](https://marketplace.visualstudio.com/items?itemName=Esri.arcgis-jsapi-snippets)
3+
Collection of VSCode snippets for common code patterns with [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/) and a VSCode extension (in the extension folder) that you can view in [VSCode marketplace](https://marketplace.visualstudio.com/items?itemName=Esri.arcgis-jsapi-snippets).
4+
5+
## How to use it
6+
7+
To install this extension you need to have VSCode version 1.35 or higher.
8+
9+
After installing type in the prefix for the code snippet followed by the `Tab` key:
10+
11+
![example](./images/code-snippets.gif)
12+
13+
- make sure to have `"editor.tabCompletion": "on"` in the settings (`Preferences` > `Open Settings(JSON)`)
14+
- if pressing Tab doesn't work then you might have several snippets with the same prefix. Press `Ctrl-Space` (`Cmd-Space` on mac) to select the one you need.
15+
16+
Read more about this feature in the official [VSCode documentation](https://code.visualstudio.com/docs/editor/userdefinedsnippets).
417

518
## Features
619

@@ -92,13 +105,13 @@ Collection of Visual Studio Code snippets for common code patterns and a Visual
92105

93106
Initial release of the ArcGIS API for JavaScript snippet extension.
94107

95-
## Instructions
108+
## Instructions
96109
* [Visual Studio Code marketplace](https://marketplace.visualstudio.com/items?itemName=Esri.arcgis-jsapi-snippets)
97110
* Install the extension using the ***Install from VSIX*** command in Visual Studio Code then import the arcgis-jsapi-snippets-1.0.0.vsix file.
98111
* Or copy/paste the snippets you want to use into the appropriate snippet file. To open the snippet files in Visual Studio Code select **User Snippets** under File > Preferences (Code > Preferences on macOS) and select the language**
99112

100113
## Requirements
101-
* Visual Studio Code
114+
* Visual Studio Code
102115

103116
## Resources
104117

images/code-snippets.gif

782 KB
Loading

snippets/html.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"Get the API": {
44
"prefix": "getApi",
55
"body": [
6-
"<link rel=\"stylesheet\" href=\"https://js.arcgis.com/${1|4.11,4.10|}/esri/css/main.css\">",
6+
"<link rel=\"stylesheet\" href=\"https://js.arcgis.com/${1|4.12,4.11|}/esri/css/main.css\">",
77
"<script>",
88
"\tvar locationPath = location.pathname.replace(/\\/[^\\/]+$/,\"\");",
99
"\twindow.dojoConfig = {",
@@ -15,7 +15,7 @@
1515
"\t]",
1616
"\t}",
1717
"</script>",
18-
"<script src=\"https://js.arcgis.com/${2|4.11, 4.10|}\"></script>"
18+
"<script src=\"https://js.arcgis.com/${2|4.12,4.11|}\"></script>"
1919
],
2020
"description": "Add script and link tags for jsapi"
2121
}

0 commit comments

Comments
 (0)