Created
October 16, 2019 18:58
-
-
Save Emuentes/ca5771fe77bcd6ea840c28395e481161 to your computer and use it in GitHub Desktop.
Run all files in repl.it root folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will automatically import all the files in your repl's root folder that have a file name beginning with "autoAdd" | |
var files = fs.readdirSync('./'); | |
for(file of files) { | |
if(file.startsWith("autoAdd")) { | |
require("./" + file); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment