-
• #2
Suggest looking at ... http://forum.espruino.com/conversations/256773/
-
• #3
The simplest way I can think of doing it is to
require("http://localhost/credentials")
- you could set up a webserver on your own computer for it. You can even set to server up to only accept local connections.I'd toyed with the idea of adding a 'macros' section into the IDE so you could set up constants that would get replaced in your code before it was uploaded. Not sure if that'd be any help?
-
• #4
... or I'd just stick it in the modules directory. That would be most simple :)
-
• #5
The idea is to make it simple for those who clone the GitHub repo. If
require
worked the way I want it they would just run the project without the need to clone the modules separately. (I also don't want to publish those modules separately because they are very custom and made for a particular project)The local server is, of course, too overcomplicated for this purpose.
-
• #6
Well, the Web IDE is all Open Source, so it wouldn't be too hard for you to change the relevant code and issue a pull request if you wanted.
-
• #7
Will look into it, thanks!
I’m writing a project that uses WiFi and I’d like to publish it on github. However, I don’t want to publish my WiFi credentials. The way I’d usually solve this is by creating a settings file and putting it in
.gitignore
. In this case it would look something like this:I also wrote some modules and I’d prefer to publish them alongside with the main project file rather than separately.
Is there any way I can require a local module not from the
modules
folder?