Any way I can require
a file from the project’s folder?
#625
Replies: 6 comments
-
Posted at 2016-09-26 by CanyonCasa Suggest looking at ... http://forum.espruino.com/conversations/256773/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-26 by @gfwilliams The simplest way I can think of doing it is to 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? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-26 by @gfwilliams ... or I'd just stick it in the modules directory. That would be most simple :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-26 by wilddeer The idea is to make it simple for those who clone the GitHub repo. If The local server is, of course, too overcomplicated for this purpose. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-26 by @gfwilliams 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. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-26 by wilddeer Will look into it, thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-25 by wilddeer
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?Beta Was this translation helpful? Give feedback.
All reactions