Skip to content

Commit 8021384

Browse files
author
Pavel Petroshenko
authored
Merge pull request #17 from electricimp/develop
v0.2.0
2 parents 3e60fd8 + 84d4b3a commit 8021384

17 files changed

+4311
-739
lines changed

Diff for: README.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Visual Studio Code can be [downloaded for a variety of platforms here](https://c
6262

6363
### 4. Install The Visual Studio Code Extension ###
6464

65-
The Electric Imp Visual Studio Code Extension can be installed using any of a number of methods, listed below. Once the Extension has been published to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/VSCode), this will be the recommended way to install the Extension, but you may alternatively perform the install using a `.vsix` file or by building the Extension from the source code.
65+
The Electric Imp Visual Studio Code Extension can be installed using any of a number of methods, listed below. Once the Extension has been published to the [Visual Studio Marketplace](https://marketplace.visualstudio.com/VSCode), this will be the recommended way to install the Extension by building it from the source code.
6666

6767
#### Installation From The Visual Studio Marketplace ####
6868

@@ -101,6 +101,14 @@ The Extension provides the following commands:
101101

102102
Select a new project working directory using **File > Open Folder...**, if you have not done so. Select the **View > Command Palette... > imp: New Project** menu item.
103103

104+
When you create new project (or perform any other action that requires access to the impCloud), you will be asked to:
105+
106+
- Provide your impCentral API base URL. The default value should be used, unless you are working with a private Electric Imp cloud.
107+
- Provide your Electric Imp account user name, password and one-time password (OTP) as needed.
108+
- Specify whether a new Product should be created or an existing one selected for the project.
109+
- Select an impCentral account for the project from a list of accounts available for the user. Please see [Collaboration](https://developer.electricimp.com/tools/impcentral/collaboratoractions) for more details.
110+
- Specify whether a new Device Group should be created or an existing one selected for the project.
111+
104112
The project directory will be set up with the following files and structure:
105113

106114
```
@@ -130,11 +138,12 @@ The `imp.config` file contains:
130138
#### Example ####
131139

132140
```json
133-
{ "ownerID" : "<user id>",
134-
"deviceGroupId" : "<device group id>",
135-
"device_code" : "<path to device source file; src/device.nut by default>",
136-
"agent_code" : "<path to agent source file; src/agent.nut by default>",
137-
"builderSettings" : "<different Builder variables>" }
141+
{ "cloudURL" : "<Electric Imp Cloud URL>",
142+
"ownerID" : "<user id>",
143+
"deviceGroupId" : "<device group id>",
144+
"device_code" : "<path to device source file; src/device.nut by default>",
145+
"agent_code" : "<path to agent source file; src/agent.nut by default>",
146+
"builderSettings": "<different Builder variables>" }
138147
```
139148

140149
When a project is created, empty device and agent code files (`device.nut` and `agent.nut`, respectively) are automatically created and stored in the project working directory’s `src` sub-directory.
@@ -144,7 +153,7 @@ If the project was created successfully, the `imp.config` file is opened.
144153
#### Important Notes ####
145154

146155
- If the project working directory is not open in Visual Studio Code, no Extension commands will work. Use **File > Open Folder...** to open the directory.
147-
- The code which is deployed to a Device Group is preprocessed and therefore may contain line control markers.
156+
- The code which is deployed to a Device Group is pre-processed and therefore may contain line control markers.
148157
- When you select an existing Device Group, the Extension downloads the code currently deployed to the group, but doesn’t transfer this code to the project file/directory structure.
149158
- If you are working with collaborators on a project, please share the original Electric Imp Extension project sources/structure via a source control system.
150159

@@ -190,11 +199,11 @@ The URL of a device’s agent can be retrieved by selecting **View > Command Pal
190199

191200
## Pre-processor And Multiple File Support ##
192201

193-
Please refer to the [Builder documentation](https://developer.electricimp.com/tools/builder) for more information on the preprocessor syntax that you can use in your Squirrel code.
202+
Please refer to the [Builder documentation](https://developer.electricimp.com/tools/builder) for more information on the pre-processor syntax that you can use in your Squirrel code.
194203

195204
### Specify GitHub Authentication Information ###
196205

197-
Please use the project `<project working directory>/settings/auth.info` file to specify your Builder GitHub authentication information:
206+
Please use the `<project working directory>/settings/auth.info` file to specify your Builder GitHub authentication information:
198207

199208
```json
200209
{ ...,
@@ -204,7 +213,7 @@ Please use the project `<project working directory>/settings/auth.info` file to
204213

205214
### Specify Builder Preset Variable Definitions ###
206215

207-
Please use the project `<project working directory>/settings/imp.config` file to specify Builder variable definitions (as [described here](https://developer.electricimp.com/tools/builder#builder-expressions)).
216+
Please use the `<project working directory>/settings/imp.config` file to specify Builder variable definitions (as [described here](https://developer.electricimp.com/tools/builder#builder-expressions)).
208217

209218
```json
210219
{ "builderSettings": { ...,

Diff for: modern_nut.png

2.22 KB
Loading

Diff for: package-lock.json

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+16-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "vscode-electricimp",
33
"displayName": "Electric Imp Squirrel",
44
"description": "Electric Imp Application Development",
5-
"version": "0.1.1",
5+
"version": "0.2.0",
66
"publisher": "electricimp",
7-
"icon": "simple_nut.png",
7+
"icon": "modern_nut.png",
88
"license": "MIT",
99
"engines": {
1010
"vscode": "^1.28.0"
@@ -128,14 +128,24 @@
128128
"grammars": [
129129
{
130130
"language": "squirrel",
131-
"scopeName": "source.nut",
132-
"path": "./syntaxes/Squirrel.tmLanguage.json"
131+
"scopeName": "source.squirrel",
132+
"path": "./syntaxes/nut.tmLanguage"
133133
},
134134
{
135135
"language": "Log",
136136
"scopeName": "stream.log",
137137
"path": "./syntaxes/log.tmLanguage"
138138
}
139+
],
140+
"snippets": [
141+
{
142+
"language": "squirrel",
143+
"path": "./snippets/electric-imp-squirrel-completions.json"
144+
},
145+
{
146+
"language": "squirrel",
147+
"path": "./snippets/squirrelSnippets.json"
148+
}
139149
]
140150
},
141151
"scripts": {
@@ -157,7 +167,8 @@
157167
"strftime": "^0.10.0",
158168
"imp-central-api": "^1.4.1",
159169
"Builder": "^2.4.0",
160-
"is-reachable": "^3.0.0"
170+
"is-reachable": "^3.0.0",
171+
"valid-url": "^1.0.9"
161172
},
162173
"repository": {
163174
"type": "git",

Diff for: simple_nut.png

-620 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)