Skip to content

Fixed Tab key behaviour during code completion. #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ While the serial communication is mediated by [`micropython.js`](https://github.

Some changes on the Electron code will require reopening the app but all UI changes will only require refreshing the window (ctrl-r/cmd-r).

## Modifying CodeMirror's behaviour

*CodeMirror.js* is built statically and loaded in the main page, same goes for *Choo.js*.
While Choo won't need to possibly be changed ever, making changes to the CodeMirror configuration requires editing `ui/arduino/libs/build/build_codemirror.js and later building it again.
In the repo root the file `build_static_libs.js` will generate static JavaScript files for both and copy them to their final paths.

```shell
node build_static_libs.js
```

## Trademarks

"Python" and the Python Logo are trademarks of the Python Software Foundation.
Expand Down
25 changes: 25 additions & 0 deletions build_static_libs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const esbuild = require('esbuild');
const { execSync } = require('child_process');

// Build choo with browserify
// Building with esbuild would require more changes
// to the source and it works well so far
console.log('Building choo with browserify...');
execSync('browserify static_libs/build_choo.js -o ui/arduino/libs/choo.js', { stdio: 'inherit' });

// Build codemirror with esbuild
console.log('Building codemirror with esbuild...');
esbuild.build({
entryPoints: ['static_libs/build_codemirror.js'],
bundle: true,
outfile: 'ui/arduino/libs/codemirror.js',
format: 'iife',
minify: false,
platform: 'browser',
target: 'es2018'
}).then(() => {
console.log('Both builds complete!');
}).catch((error) => {
console.error('CodeMirror build failed:', error);
process.exit(1);
});
Loading