-
• #3
Local sandbox has priority over internet.
Which is good, just don't forget about it
-
• #5
@the1laz yes - at least the sandbox keeps everything together.
You mean via node.js?
I'm not sure EspruinoTools can use local files yet. There should be a 'processor' type defined for getting files (and then various handlers see if they can find them by whatever means they can). If that's the case then it should be easy to add.
If not I guess I should add it, but I'm running out of time again now :)
-
• #6
I don't need it myself, (I'm using a webserver for my own modules), but I might have a crack if I get around to it. I saw the section that it needs to work with, so I have an idea of what I have to do.
-
• #7
are you sure that the local sandbox has priority over internet?
i tried it with the ESP8266_v25 module, i copied it to the project/module folder, but require took always the internet version, after renaming (and using that name in require) it worked
-
• #8
Hmm. That's odd - could it have been a capitalisation issue?
I guess it's possible it does:
- Check local for .min.js
- Check online for .min.js
- Check local for .js
- Check online for .js
You could tweak it by changing the module load order in settings to
.js|.min.js
... that logic should probably be changed though.
- Check local for .min.js
-
• #9
i will check it again
i interpret your order, that i need to put the minified version local do get the local priority?
-
• #10
Yes (or just rename the file).
However the search order for file extensions can be specified in settings - you could even search for and prioritise
*.my_version.js
if you wanted.
Npm handles it all, node just uses whatever is supplied.
Can the web IDE use local files without a http server? If it (optionally?) preferentially looked in a node_modules folder when loading modules, then people could just keep local copies of the modules they use if they want them to stay unchanged. Then they can use whatever method they wanted to manage versions (git, npm, etc.).