Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Create Release Version (to staging) #230

Merged
merged 329 commits into from
Mar 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
329 commits
Select commit Hold shift + click to select a range
68420f0
Add microbit svg and style
xnkevinnguyen Jan 29, 2020
3952361
connected display to communciation
andreamah Feb 4, 2020
25a2f72
Update snapshot tests
xnkevinnguyen Jan 30, 2020
f978503
Add styling for microbit image
xnkevinnguyen Jan 30, 2020
9d1c0bf
Microbit registers button clicks
xnkevinnguyen Jan 30, 2020
80ebeb2
Add listeners for button clicks
xnkevinnguyen Jan 31, 2020
b4a8ad8
Creating the skeleton of the microbit library and adding a button obj…
xnkevinnguyen Feb 3, 2020
e00ac69
resolved merge conflicts
andreamah Feb 4, 2020
20969a4
fixes
andreamah Feb 4, 2020
6d175b2
resolved merge conflicts
andreamah Feb 4, 2020
7d04635
shim adjustement
andreamah Feb 4, 2020
a5ce294
Merge branch 'users/t-xunguy/leds' into users/t-anmah/frontend-backen…
andreamah Feb 4, 2020
4a0a84b
worksgit add *!
andreamah Feb 4, 2020
cdb042f
Merge pull request #184 from microsoft/users/t-xunguy/microbit-image
xnkevinnguyen Feb 4, 2020
01f52e3
Remove children declaration from cpx simulator
xnkevinnguyen Feb 4, 2020
579985f
Fix merge conflicts
xnkevinnguyen Feb 4, 2020
063e5d3
Updated dependencies (#191)
vandyliu Feb 4, 2020
e4ae67e
Merge branch 'dev' into users/t-xunguy/buttons
xnkevinnguyen Feb 4, 2020
7214d37
Use NodeRef instead of getelementbyid
xnkevinnguyen Feb 4, 2020
a8c12db
Merge branch 'users/t-xunguy/buttons' of https://github.com/microsoft…
xnkevinnguyen Feb 4, 2020
dc8470c
Add active device to play message
xnkevinnguyen Feb 4, 2020
61ec635
some experimentation with recieving device type
andreamah Feb 4, 2020
f5f0132
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
andreamah Feb 4, 2020
b62b076
Add proper typing to ref
xnkevinnguyen Feb 4, 2020
de38218
Stop button will reset correctly
xnkevinnguyen Feb 4, 2020
e27a428
Functionality for refresh button on microbit
xnkevinnguyen Feb 4, 2020
5231b03
Format files
xnkevinnguyen Feb 4, 2020
8596f0c
resolved merge con
andreamah Feb 4, 2020
bac6cc2
Fix merge conflicts
xnkevinnguyen Feb 5, 2020
09e5370
Update test snapshots
xnkevinnguyen Feb 5, 2020
2fccfce
Add refs to buttons
xnkevinnguyen Feb 5, 2020
4ea844d
Add state management for devices inside extension api
xnkevinnguyen Feb 5, 2020
8f73070
refactoring
andreamah Feb 5, 2020
b4e7b6a
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
xnkevinnguyen Feb 5, 2020
7dbfa8d
small adjustment
andreamah Feb 5, 2020
5067bab
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
xnkevinnguyen Feb 5, 2020
7b6d2ca
Only send current device messages to webview
xnkevinnguyen Feb 5, 2020
42be28a
Kill process on tab change
xnkevinnguyen Feb 5, 2020
ec606b2
Remove unecessary logs
xnkevinnguyen Feb 5, 2020
13b9852
Update with latest changes
xnkevinnguyen Feb 6, 2020
059b9f5
Use reference for buttons
xnkevinnguyen Feb 6, 2020
a8a4ea5
Use device list key for keeping state of current active device
xnkevinnguyen Feb 6, 2020
e5593dc
Linting ts
xnkevinnguyen Feb 6, 2020
6ed027d
formatted python black
andreamah Feb 6, 2020
c96a4e3
Update UI test for selector
xnkevinnguyen Feb 6, 2020
55b7250
Remove unecessary spread operations of the state for microbit
xnkevinnguyen Feb 6, 2020
05f9bca
abstracted debugger away
andreamah Feb 6, 2020
ca1ed69
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
andreamah Feb 6, 2020
086250c
Display module for microbit library (#189)
vandyliu Feb 6, 2020
35a945a
merged in display
andreamah Feb 6, 2020
eeb025d
fixed deadlock issues
andreamah Feb 6, 2020
7363419
reformat w black
andreamah Feb 6, 2020
50db730
fixed utils test
andreamah Feb 6, 2020
78066e8
Logic for set state only in extension.tsx
xnkevinnguyen Feb 7, 2020
ba328aa
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
xnkevinnguyen Feb 7, 2020
7551e5c
Microbit svg to a class with getters to get svg element
xnkevinnguyen Feb 7, 2020
4437284
Use refs for leds
xnkevinnguyen Feb 7, 2020
a109abc
Export messaging utils in a separate file
xnkevinnguyen Feb 7, 2020
dc73efb
Remove unused imports
xnkevinnguyen Feb 7, 2020
d859420
Messages from webview are made constant
xnkevinnguyen Feb 7, 2020
26358b0
Update snapshots
xnkevinnguyen Feb 7, 2020
84fd761
Change function name to onselectfile
xnkevinnguyen Feb 7, 2020
4e8e95e
Update typing for sending message
xnkevinnguyen Feb 10, 2020
6cbdf5b
updated create_message to use state copy
andreamah Feb 10, 2020
8d0438c
updated node usb native from vscode-arduino repo (#194)
andreamah Feb 10, 2020
a84f7fe
added listeners on buttons for backend
andreamah Feb 10, 2020
ee50718
fixed state updating for emitter
andreamah Feb 10, 2020
6b4f9f1
fixed state modification issue
andreamah Feb 10, 2020
767d14a
Add button emitter
xnkevinnguyen Feb 10, 2020
1266d12
Merge branch 'users/t-anmah/button-integration' of https://github.com…
xnkevinnguyen Feb 10, 2020
afc1a5a
fixed small state issue
andreamah Feb 10, 2020
3611b56
changed var name from state_copy to updated_state
andreamah Feb 10, 2020
2318a06
Merge branch 'dev' into users/t-anmah/frontend-backend-integration
andreamah Feb 10, 2020
f962c0e
Add safety on set state for cpx and microbit
xnkevinnguyen Feb 10, 2020
c510ba3
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
xnkevinnguyen Feb 10, 2020
8f4a1eb
Merge pull request #192 from microsoft/users/t-anmah/frontend-backend…
xnkevinnguyen Feb 10, 2020
86610b6
Modify format of messages from vscode api to python
xnkevinnguyen Feb 10, 2020
53b998f
Fix merge conflicts
xnkevinnguyen Feb 10, 2020
d8082fa
fixed integration bugs on backend
andreamah Feb 10, 2020
11f6262
Merge branch 'users/t-anmah/button-integration' of https://github.com…
andreamah Feb 10, 2020
549978c
Bind functions to simulator
xnkevinnguyen Feb 10, 2020
af56a1a
Merge branch 'users/t-anmah/button-integration' of https://github.com…
xnkevinnguyen Feb 10, 2020
cda4e75
Fix missing argument onmouseup
xnkevinnguyen Feb 10, 2020
6b38fcc
re-organized structure for autocorrect (#193)
andreamah Feb 10, 2020
c876f4f
button connections implemented
andreamah Feb 10, 2020
d669fdc
resolved merge conflicts
andreamah Feb 10, 2020
f97990e
some renaming
andreamah Feb 10, 2020
0525df8
initial work on sensor listeners
andreamah Feb 10, 2020
8dc2aee
first commit for sensors
Feb 10, 2020
1916b49
Updated tests
Feb 10, 2020
ae1a4eb
Updated tests
Feb 10, 2020
bc074f3
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 10, 2020
20fc724
Added docs link
Feb 10, 2020
120f42d
Rearranged variables to be sorted
Feb 10, 2020
41d1a4a
Create accelerometer sensor
xnkevinnguyen Feb 10, 2020
0380c7a
Added set_accel helper function
Feb 10, 2020
b5a523b
Fixed bug
Feb 10, 2020
9a9b1c1
more progress on connecting backend to listener
andreamah Feb 10, 2020
fa0e7bb
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 10, 2020
5f73a16
preliminary backend for sensors
andreamah Feb 10, 2020
c20029b
incorporated PR feedback
andreamah Feb 10, 2020
64491e4
Merge remote-tracking branch 'origin/users/t-anmah/button-integration…
xnkevinnguyen Feb 11, 2020
7d6b4c8
merged with button integration and resolved conflicts
andreamah Feb 11, 2020
4f4338e
Merge remote-tracking branch 'origin/users/t-anmah/sensor-integration…
xnkevinnguyen Feb 11, 2020
69896ea
Accelerometer and motion sensor pass props to three dimension sliders
xnkevinnguyen Feb 11, 2020
26ee1a8
added constants to microbit for sensors
andreamah Feb 11, 2020
8b872fe
Merge branch 'users/t-xunguy/sensors' into users/t-anmah/sensor-integ…
xnkevinnguyen Feb 11, 2020
5430209
Updated from PR comments
Feb 11, 2020
8e1afe9
Button interaction (#195)
xnkevinnguyen Feb 11, 2020
7411703
Updated accelerometer to throw exceptions when invalid acceleration
Feb 11, 2020
d200b1b
Updated temp and light_level to raise exception for invalid values
Feb 11, 2020
00cf238
Added init tests
Feb 11, 2020
4786d1c
Merged with dev
Feb 11, 2020
0d6d021
got sensors working
andreamah Feb 11, 2020
4c3fb2f
reformatted
andreamah Feb 11, 2020
d3309c2
removed comma
Feb 11, 2020
bb1052c
resolved merge conflicts
andreamah Feb 11, 2020
f0ec9d9
resolved merge conflict
andreamah Feb 11, 2020
1fc609a
accel error message changed
Feb 11, 2020
933b4ad
sorted imports
Feb 11, 2020
b46af05
Updated tests
Feb 11, 2020
8c86512
Update tests for snapshot with added toolbar
xnkevinnguyen Feb 11, 2020
039e440
Merge branch 'users/t-anmah/sensor-integration' of https://github.com…
xnkevinnguyen Feb 11, 2020
900dbd9
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 11, 2020
d00ca9b
incorporated PR feedback
andreamah Feb 11, 2020
7b75f76
reformatting
andreamah Feb 11, 2020
f621753
first comimt
Feb 11, 2020
58f97a5
Remove any declerations of vscode that are duplicate to utils
xnkevinnguyen Feb 12, 2020
d7ff9f4
Updated for PR comments
Feb 12, 2020
a8cd70d
re-worked first-time dependency install (#198)
andreamah Feb 12, 2020
d1a4f3a
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 12, 2020
df5edaf
updated from pr comments
Feb 12, 2020
3da2fd1
Merge branch 'dev' into users/t-anmah/sensor-integration
andreamah Feb 12, 2020
2e4e326
Added light, temperature and accelerometer on python side (#196)
vandyliu Feb 12, 2020
9fe133f
resolved merge conflicts
andreamah Feb 12, 2020
65d9d63
abstracted away updating into components
andreamah Feb 12, 2020
f760dc9
reformatting
andreamah Feb 12, 2020
06f7555
Update currently displayed image on webview according to command
xnkevinnguyen Feb 12, 2020
ff0d18f
Merge pull request #197 from microsoft/users/t-anmah/sensor-integration
xnkevinnguyen Feb 12, 2020
15a059c
some debugger work
andreamah Feb 12, 2020
f6c0ee3
Fix debugging missing function (#201)
xnkevinnguyen Feb 12, 2020
8f36dad
debug restructure
andreamah Feb 12, 2020
80cd19f
Fixed merge conflicts
Feb 12, 2020
5e9c90d
Reformat svg utils
xnkevinnguyen Feb 12, 2020
480002a
Merge branch 'users/t-vali/microbit-template' of https://github.com/m…
xnkevinnguyen Feb 12, 2020
0674c6f
Formatted with black
Feb 12, 2020
3043cb9
Merge branch 'users/t-vali/microbit-template' of https://github.com/m…
Feb 12, 2020
65720b2
Merge pull request #200 from microsoft/users/t-vali/microbit-template
xnkevinnguyen Feb 12, 2020
e20d4ad
resolved merge conflicts
andreamah Feb 12, 2020
429ef24
merged listeners
andreamah Feb 12, 2020
8eae513
fixed circular dependency
andreamah Feb 13, 2020
997719d
Remove duplicate emitter
xnkevinnguyen Feb 13, 2020
f657255
Load device into script tag for initial open
xnkevinnguyen Feb 13, 2020
cb0db0c
Merge branch 'users/t-xunguy/debugger-webview' into users/t-anmah/deb…
xnkevinnguyen Feb 13, 2020
8891bf5
Build status of azure pipelines in README.MD (#202)
vandyliu Feb 13, 2020
f7e5b52
modified debugger listener
andreamah Feb 13, 2020
88bff5e
connected microbit to debugger
andreamah Feb 13, 2020
9828f41
Load device on boot
xnkevinnguyen Feb 13, 2020
ecbaa38
Formatting app
xnkevinnguyen Feb 14, 2020
2e96340
Remove unused attribute to debug server
xnkevinnguyen Feb 14, 2020
395c266
Remove unused script tag
xnkevinnguyen Feb 14, 2020
ce37920
Updated nls commands
Feb 14, 2020
3de8c7f
Format extension
xnkevinnguyen Feb 14, 2020
da37af1
Remove tabs from webview
xnkevinnguyen Feb 14, 2020
e3fb24c
Load correct device on new file command (#203)
xnkevinnguyen Feb 15, 2020
e216888
Reformat buttons to make it clearer
xnkevinnguyen Feb 18, 2020
ad7f190
Update tests
xnkevinnguyen Feb 18, 2020
432bbd2
Merge branch 'dev' into users/t-xunguy/buttons-styling
xnkevinnguyen Feb 18, 2020
4ef0dff
Merge pull request #205 from microsoft/users/t-xunguy/remove-tabs
xnkevinnguyen Feb 18, 2020
b80ea14
Merge branch 'dev' into users/t-xunguy/buttons-styling
xnkevinnguyen Feb 18, 2020
294e82a
Adjusting command pallet
Feb 18, 2020
d7e9bca
Remove important property on css
xnkevinnguyen Feb 18, 2020
ea1986c
Merge pull request #206 from microsoft/users/t-xunguy/buttons-styling
xnkevinnguyen Feb 18, 2020
c5dddb8
handshake for client communication
andreamah Feb 19, 2020
95d20c5
Merge branch 'dev' into users/t-vali/command-pallet-reconfig
vandyliu Feb 19, 2020
a050aff
updated debugger client
andreamah Feb 19, 2020
b3f6567
modifications to active device microbit
andreamah Feb 19, 2020
7f5bdb2
Emit only when the calls are finished
xnkevinnguyen Feb 19, 2020
fb52ba9
Merge pull request #207 from microsoft/users/t-vali/command-pallet-re…
xnkevinnguyen Feb 19, 2020
4a7bea5
Add the Azure Boards badge to the README (#208)
smmatte Feb 19, 2020
297dd87
Reformatting
xnkevinnguyen Feb 19, 2020
ffecbf6
Update branch with dev
xnkevinnguyen Feb 19, 2020
2fb6f9f
fixed backend socket issue
andreamah Feb 19, 2020
5ab2a1b
disconnect works when program is done
andreamah Feb 20, 2020
836131a
Add tooltip for sensors
xnkevinnguyen Feb 20, 2020
8dcdca9
Lint changes
xnkevinnguyen Feb 20, 2020
7cde2cb
Update snapshot tests for the tooltip
xnkevinnguyen Feb 20, 2020
e4136cd
Remove unecessary space
xnkevinnguyen Feb 20, 2020
8512957
Update tests
xnkevinnguyen Feb 20, 2020
85af162
Merge pull request #212 from microsoft/users/t-xunguy/tooltip
xnkevinnguyen Feb 20, 2020
c480348
Initial implementation of the tracker
xnkevinnguyen Feb 20, 2020
797edbe
Added telemetry to typescript side of extension (#211)
vandyliu Feb 20, 2020
ca7d7ea
debugger work
andreamah Feb 20, 2020
62afc4d
Upgrade dependencies for security purposes
vandyliu Feb 20, 2020
b645302
backend cleanup
andreamah Feb 20, 2020
12f6458
Merge branch 'dev' into users/t-anmah/debugger
andreamah Feb 20, 2020
f537d35
Create messaging service class
xnkevinnguyen Feb 21, 2020
25f2d5a
Make messages constant
xnkevinnguyen Feb 21, 2020
e951947
remove temporary console logs
xnkevinnguyen Feb 21, 2020
10f483a
Update with latest debugger changes
xnkevinnguyen Feb 21, 2020
b616a7d
Send stacktrace message from adapter
xnkevinnguyen Feb 21, 2020
532d196
Output dependency installation failures to an output channel (#210)
eishan05 Feb 21, 2020
0dec72d
Establish connection for debug adapter and webview with the messaging…
xnkevinnguyen Feb 21, 2020
97cb358
Separated telemetry metrics for debugger (#214)
vandyliu Feb 21, 2020
6dbfc9d
Debug adapter sends start and stop message to webview
xnkevinnguyen Feb 21, 2020
e58caf6
Remove changes on button component
xnkevinnguyen Feb 21, 2020
b6abfd5
Reformatting
xnkevinnguyen Feb 21, 2020
1f977c4
Pause input if on breakpoint
xnkevinnguyen Feb 22, 2020
72b9f1e
Add telemetry for python (#213)
vandyliu Feb 22, 2020
da18aa7
Merge branch 'users/t-xunguy/dap' of https://github.com/microsoft/vsc…
xnkevinnguyen Feb 24, 2020
44daa13
Freeze buttons on svg
xnkevinnguyen Feb 24, 2020
470282d
src/adafruit_circuitplayground
andreamah Feb 24, 2020
e029bee
removed bad call from debug user code
andreamah Feb 24, 2020
997cf2a
Update with feedback
xnkevinnguyen Feb 24, 2020
79187f4
resolved merge conflicts
andreamah Feb 24, 2020
78821fb
Merge branch 'users/t-anmah/debugger' of https://github.com/microsoft…
andreamah Feb 24, 2020
389a2b2
Merge pull request #216 from microsoft/users/t-anmah/debugger
xnkevinnguyen Feb 24, 2020
9d3265e
added socket message for python process exit
andreamah Feb 25, 2020
c6e535e
Send message to python side on disconnect from vscode server side
xnkevinnguyen Feb 25, 2020
8cc304e
backend confirmation message
andreamah Feb 25, 2020
9fe8287
Confirm disconnect on python side
xnkevinnguyen Feb 25, 2020
58e989e
Debug Adapter Tracker Implementation (#217)
xnkevinnguyen Feb 26, 2020
85fed6b
Creating preview mode (#219)
vandyliu Feb 26, 2020
0ad646b
Update with dev
xnkevinnguyen Feb 26, 2020
d82263b
Lint files
xnkevinnguyen Feb 26, 2020
d3fb796
Keep the state for temperature sensor
xnkevinnguyen Feb 24, 2020
99b5d0d
Manage state for sensors on both cpx and microbit
xnkevinnguyen Feb 25, 2020
83901da
Reset sensor on reset-state message
xnkevinnguyen Feb 25, 2020
a987e9d
Lint files
xnkevinnguyen Feb 25, 2020
adc5749
Format files
xnkevinnguyen Feb 25, 2020
eb417fe
Disconnect frontend after timeout
xnkevinnguyen Feb 26, 2020
fef3c91
Add missing import for typing
xnkevinnguyen Feb 26, 2020
732e544
Remove a comment and console.log
xnkevinnguyen Feb 26, 2020
85c34a4
Merge pull request #220 from microsoft/users/t-xunguy/state-management
xnkevinnguyen Feb 26, 2020
877cd30
Virtual Environment Support for Dependencies (#218)
andreamah Feb 26, 2020
395e5d4
Fixed command palette bug (#227)
vandyliu Feb 27, 2020
ddb45b4
Readme Update and adding MD File for Store Upload (#224)
andreamah Feb 27, 2020
a690356
Release Note (#223)
andreamah Feb 27, 2020
c8f3b9d
Only disconnect socket io server on exit from port and not on restart
xnkevinnguyen Feb 27, 2020
b8d46b8
Merge branch 'dev' into users/t-anmah/debugger-socket-fix
xnkevinnguyen Feb 27, 2020
9e10e08
Format files
xnkevinnguyen Feb 27, 2020
04fb8ff
Merge branch 'users/t-anmah/debugger-socket-fix' of https://github.co…
xnkevinnguyen Feb 27, 2020
34be933
Remove unecessary logs
xnkevinnguyen Feb 27, 2020
5be7f32
Save previous debugger to disconnect
xnkevinnguyen Feb 27, 2020
11ac3d8
Merge pull request #221 from microsoft/users/t-anmah/debugger-socket-fix
xnkevinnguyen Feb 27, 2020
89d9fe8
Release Note Fix (#229)
andreamah Feb 27, 2020
3d21ebb
Venv fixes (#228)
andreamah Feb 27, 2020
6cf1ad6
More Venv Fixes + Dependency Fail Detect on Python (#231)
andreamah Feb 28, 2020
1e839d9
Fix venv setup for UNIX (#232)
andreamah Feb 29, 2020
70f553c
micro:bit key presses functionality (accessibility) (#222)
vandyliu Mar 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ out/
!locales/**/out/
package.nls.*.json

# virtual environment
venv/

# testing
.vscode-test

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
}
132 changes: 84 additions & 48 deletions README.md

Large diffs are not rendered by default.

275 changes: 140 additions & 135 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,135 +1,140 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

const gulp = require("gulp");

const ts = require("gulp-typescript");
const sourcemaps = require("gulp-sourcemaps");
const typescript = require("typescript");
const del = require("del");
const es = require("event-stream");
const vsce = require("vsce");
const nls = require("vscode-nls-dev");

const tsProject = ts.createProject("./tsconfig.json", { typescript });

const inlineMap = true;
const inlineSource = false;
const outDest = "out";

// A list of all locales supported by VSCode can be found here: https://code.visualstudio.com/docs/getstarted/locales
const languages = [{ folderName: "en", id: "en" }];

gulp.task("clean", () => {
return del(
[
"out/*",
"package.nls.*.json",
"../../dist/*0.0.0-UNTRACKEDVERSION.vsix"
],
{ force: true }
);
});

const pythonToMove = [
"./src/adafruit_circuitplayground/*.*",
"./src/*.py",
"./src/requirements.txt",
];

gulp.task("python-compile", () => {
// the base option sets the relative root for the set of files,
// preserving the folder structure
return gulp.src(pythonToMove, { base: "./src/" }).pipe(gulp.dest("out"));
});

gulp.task("internal-compile", () => {
return compile(false);
});

gulp.task("internal-nls-compile", () => {
return compile(true);
});

gulp.task("add-locales", () => {
return gulp
.src(["package.nls.json"])
.pipe(nls.createAdditionalLanguageFiles(languages, "locales"))
.pipe(gulp.dest("."));
});

gulp.task("vsce:publish", () => {
return vsce.publish();
});

gulp.task("vsce:package", () => {
return vsce.createVSIX({
packagePath: "../../dist/deviceSimulatorExpress-0.0.0-UNTRACKEDVERSION.vsix"
});
});

gulp.task(
"compile",
gulp.series("clean", "internal-compile", "python-compile", callback => {
callback();
})
);

gulp.task(
"build",
gulp.series(
"clean",
"internal-nls-compile",
"python-compile",
"add-locales",
callback => {
callback();
}
)
);

gulp.task(
"publish",
gulp.series("compile", "vsce:publish", callback => {
callback();
})
);

gulp.task(
"package",
gulp.series("compile", "vsce:package", callback => {
callback();
})
);

//---- internal

function compile(buildNls) {
var r = tsProject
.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js.pipe(buildNls ? nls.rewriteLocalizeCalls() : es.through())
.pipe(
buildNls
? nls.createAdditionalLanguageFiles(languages, "locales", "out")
: es.through()
);

if (inlineMap && inlineSource) {
r = r.pipe(sourcemaps.write());
} else {
r = r.pipe(
sourcemaps.write("../out", {
// no inlined source
includeContent: inlineSource,
// Return relative source map root directories per file.
sourceRoot: "../src"
})
);
}

return r.pipe(gulp.dest(outDest));
}
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

const gulp = require("gulp");

const ts = require("gulp-typescript");
const sourcemaps = require("gulp-sourcemaps");
const typescript = require("typescript");
const del = require("del");
const es = require("event-stream");
const vsce = require("vsce");
const nls = require("vscode-nls-dev");

const tsProject = ts.createProject("./tsconfig.json", { typescript });

const inlineMap = true;
const inlineSource = false;
const outDest = "out";

// A list of all locales supported by VSCode can be found here: https://code.visualstudio.com/docs/getstarted/locales
const languages = [{ folderName: "en", id: "en" }];

gulp.task("clean", () => {
return del(
[
"out/*",
"package.nls.*.json",
"../../dist/*0.0.0-UNTRACKEDVERSION.vsix",
],
{ force: true }
);
});

const pythonToMove = [
"./src/adafruit_circuitplayground/*.*",
"./src/microbit/*.*",
"./src/microbit/!(test)/**/*",
"./src/*.py",
"./src/common/*.py",
"./src/requirements.txt",
"./src/templates/*.*"
];

gulp.task("python-compile", () => {
// the base option sets the relative root for the set of files,
// preserving the folder structure
return gulp.src(pythonToMove, { base: "./src/" }).pipe(gulp.dest("out"));
});

gulp.task("internal-compile", () => {
return compile(false);
});

gulp.task("internal-nls-compile", () => {
return compile(true);
});

gulp.task("add-locales", () => {
return gulp
.src(["package.nls.json"])
.pipe(nls.createAdditionalLanguageFiles(languages, "locales"))
.pipe(gulp.dest("."));
});

gulp.task("vsce:publish", () => {
return vsce.publish();
});

gulp.task("vsce:package", () => {
return vsce.createVSIX({
packagePath:
"../../dist/deviceSimulatorExpress-0.0.0-UNTRACKEDVERSION.vsix",
});
});

gulp.task(
"compile",
gulp.series("clean", "internal-compile", "python-compile", callback => {
callback();
})
);

gulp.task(
"build",
gulp.series(
"clean",
"internal-nls-compile",
"python-compile",
"add-locales",
callback => {
callback();
}
)
);

gulp.task(
"publish",
gulp.series("compile", "vsce:publish", callback => {
callback();
})
);

gulp.task(
"package",
gulp.series("compile", "vsce:package", callback => {
callback();
})
);

//---- internal

function compile(buildNls) {
var r = tsProject
.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js.pipe(buildNls ? nls.rewriteLocalizeCalls() : es.through())
.pipe(
buildNls
? nls.createAdditionalLanguageFiles(languages, "locales", "out")
: es.through()
);

if (inlineMap && inlineSource) {
r = r.pipe(sourcemaps.write());
} else {
r = r.pipe(
sourcemaps.write("../out", {
// no inlined source
includeContent: inlineSource,
// Return relative source map root directories per file.
sourceRoot: "../src",
})
);
}

return r.pipe(gulp.dest(outDest));
}
4 changes: 2 additions & 2 deletions locales/en/out/constants.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"info.deploySimulator": "\n[INFO] Deploying code to the simulator...\n",
"info.deploySuccess": "\n[INFO] Code successfully deployed\n",
"info.extensionActivated": "Congratulations, your extension Adafruit_Simulator is now active!",
"info.firstTimeWebview": "To reopen the simulator click on the \"Open Simulator\" button on the upper right corner of the text editor, or select the command \"Open Simulator\" from command palette.",
"info.firstTimeWebview": "To reopen the simulator select the command \"Open Simulator\" from command palette.",
"info.installPythonDependencies": "Do you want us to try and install this extensions dependencies for you?",
"error.invalidFileExtensionDebug": "The file you tried to run isn\\'t a Python file.",
"info.newFile": "New to Python or the Circuit Playground Express? We are here to help!",
Expand All @@ -36,7 +36,7 @@
"info.privacyStatement": "Privacy Statement",
"info.successfulInstall": "Successfully installed Python dependencies.",
"info.thirdPartyWebsite": "By clicking \"Agree and Proceed\" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit's privacy policy",
"info.welcomeOutputTab": "Welcome to the Adafruit Simulator output tab!\n\n",
"info.welcomeOutputTab": "Welcome to the Device Simulator Express output tab!\n\n",
"label.webviewPanel": "Device Simulator Express",
"name": "Device Simulator Express",

Expand Down
29 changes: 16 additions & 13 deletions locales/en/package.i18n.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"deviceSimulatorExpressExtension.commands.changeBaudRate": "Change Baud Rate",
"deviceSimulatorExpressExtension.commands.closeSerialMonitor": "Close Serial Monitor",
"deviceSimulatorExpressExtension.commands.label": "Device Simulator Express",
"deviceSimulatorExpressExtension.commands.openSerialMonitor": "Open Serial Monitor",
"deviceSimulatorExpressExtension.commands.openSimulator": "Open Simulator",
"deviceSimulatorExpressExtension.commands.runSimulator": "Run Simulator",
"deviceSimulatorExpressExtension.commands.newFile": "New File",
"deviceSimulatorExpressExtension.commands.runDevice": "Deploy to Device",
"deviceSimulatorExpressExtension.commands.selectSerialPort": "Select Serial Port",
"deviceSimulatorExpressExtension.commands.common.installDependencies": "Install Extension Dependencies",
"deviceSimulatorExpressExtension.commands.common.label": "Device Simulator Express",
"deviceSimulatorExpressExtension.commands.common.runSimulator": "Run Simulator",
"deviceSimulatorExpressExtension.commands.cpx.changeBaudRate": "[Circuit Playground Express] Change Baud Rate",
"deviceSimulatorExpressExtension.commands.cpx.closeSerialMonitor": "[Circuit Playground Express] Close Serial Monitor",
"deviceSimulatorExpressExtension.commands.cpx.openSerialMonitor": "[Circuit Playground Express] Open Serial Monitor",
"deviceSimulatorExpressExtension.commands.cpx.openSimulator": "[Circuit Playground Express] Open Simulator",
"deviceSimulatorExpressExtension.commands.cpx.newFile": "[Circuit Playground Express] New File",
"deviceSimulatorExpressExtension.commands.cpx.deployToDevice": "[Circuit Playground Express] Deploy to Device",
"deviceSimulatorExpressExtension.commands.cpx.selectSerialPort": "[Circuit Playground Express] Select Serial Port",
"deviceSimulatorExpressExtension.commands.microbit.openSimulator": "[micro:bit] Open Simulator",
"deviceSimulatorExpressExtension.commands.microbit.newFile": "[micro:bit] New File",
"deviceSimulatorExpressExtension.configuration.title": "Device Simulator Express configuration",
"deviceSimulatorExpressExtension.configuration.properties.open": "Whether to show 'Open Simulator' icon in editor title menu.",
"deviceSimulatorExpressExtension.configuration.properties.device": "Whether to show 'Run Device' icon in editor title menu.",
"deviceSimulatorExpressExtension.configuration.properties.simulator": "Whether to show 'Run Simulator' icon in editor title menu.",
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger."
"deviceSimulatorExpressExtension.configuration.properties.configEnvOnChange": "When you change the Python interpreter, the Device Simulator Express will automatically configure itself for the required dependencies.",
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger.",
"deviceSimulatorExpressExtension.configuration.properties.dependencyChecker": "Whether or not to ask if we can download dependencies. If unchecked, the extension will default to never download dependencies, except when automatically creating a virtual environment in the extension files."
"deviceSimulatorExpressExtension.configuration.properties.previewMode": "Enable this to test out and play with the new micro:bit simulator!"
}
Loading