Finally got back to poking around some of the code (focussing on front end, i.e. the index.html.gz
) and wondering how to reduce its size.
It’s built using gulp
which is waaaaaaaaaaaaaaaaaay past its ‘use-by-date’, but changing that is something to talk about with the Fluid-NC team.
It still sorta supports IE, so we could rip out that little bit of code and save a few bytes.
But it also supports lots of languages - all at once.
Here’s the supported language codes - note that this is Fluid NC’s list, I think Maslow’s bit of the code is just English? (can someone else correct me here)
en, fr, es, de, it, ja, hu, pl, ptbr, ru, tr, uk, zh_cn
There’s also 3 special language codes:
fl
gets you ‘fluid_nc’ language, whatever that is
grbl
gets you all of the above languages, excluding ja
and zh_cn
No language code (what build.bat
does) or the code all
gets you all languages
However, there’s an alternate build command buildLanguagePacks.bat
, which builds each language on its own. This seems way more convenient, although there was some weird behaviour for me where it deleted each file after making it. Using source control in VSCode though I just restored all of them.
Special language codes:
‘multi’ (AKA ‘all’) 157KB
‘grbl’ (no ‘ja’ or ‘zh_cn’) 114KB
Individual language codes:
‘ru’, ‘uk’, ‘zh_cn’ 114KB
‘hu’, ‘pl’, ‘ptbr’, ‘tr’ 113KB
‘it’ 111KB
‘de’, ‘es’ 110KB
‘en’, ‘fr’, ‘jp’ 107KB
I reckon running that buildLanguagePacks.bat
(maybe restoring everything it deletes as it goes …) and then through all of the languages
folder into the releases and say, ‘pick your language’ might be a good start.