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:
var WiFiCredentials = require('./wifi-credentials.js');
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?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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?