From 2654d46ad31b86da120654b3d54a934316993693 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Thu, 4 Apr 2024 13:58:50 +0100 Subject: [PATCH] new release, ensure that code completion knows about `g` on devices with an LCD --- js/plugins/tern.js | 8 +++++++- manifest.json | 2 +- package.json | 2 +- serviceworker.js | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/js/plugins/tern.js b/js/plugins/tern.js index bde8e88e..124e25df 100644 --- a/js/plugins/tern.js +++ b/js/plugins/tern.js @@ -32,7 +32,7 @@ if (err) throw new Error("Request for ecma5.json failed: " + err); espruinoJSON = code; server = new CodeMirror.TernServer({defs: [JSON.parse(espruinoJSON)]}); - + Espruino.Core.EditorJavaScript.getEditors().forEach(applyToEditor); }); @@ -94,6 +94,12 @@ }; } }); + if ("LCD" in data.devices) + defs["g"] = { + "!type": "+Graphics", + "!doc": "Graphics instance for on-device LCD", + "!url": "https://www.espruino.com/Reference#Graphics" + }; } // reload tern server with new defs diff --git a/manifest.json b/manifest.json index 7adf4fcd..01b4047f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Espruino Web IDE", "short_name": "Espruino IDE", "description": "A Terminal and Graphical code Editor for Espruino JavaScript Microcontrollers", - "version": "0.78.15", + "version": "0.78.16", "app": { "background": { "scripts": ["js/background.js"] diff --git a/package.json b/package.json index 0e447715..6d2f535a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espruino-web-ide", - "version": "0.78.15", + "version": "0.78.16", "description": "A Terminal and Graphical code Editor for Espruino JavaScript Microcontrollers", "//1": "-------------------------------------------------------- nw.js", "main": "main.html", diff --git a/serviceworker.js b/serviceworker.js index 0011b503..e96467af 100644 --- a/serviceworker.js +++ b/serviceworker.js @@ -1,5 +1,5 @@ // Service worker for Offline Web IDE -const VERSION = 'v120'; +const VERSION = 'v121'; const CACHED_RESOURCES = [ 'blockly/blockly_espruino.js',