espruino / EspruinoTools

JavaScript library of tools for Espruino - used for the Web IDE, CLI, etc.
Apache License 2.0
150 stars 89 forks source link

In CLI mode, order of modules is wrong. pretokenise=>acorn parse errors #138

Closed gfwilliams closed 2 years ago

gfwilliams commented 2 years ago

As mentioned at http://forum.espruino.com/conversations/367900/#comment16179710

Basically the CLI loads the modules in the order that they are in the directory. There are actually specific orders required though - eg https://github.com/espruino/EspruinoWebIDE/blob/master/index.html#L220

So we should probably have a 'sortorder' in the module declaration, and then they can be sorted before init is called