Skip to content

Instantly share code, notes, and snippets.

@Emuentes
Created October 16, 2019 18:58
Show Gist options
  • Save Emuentes/ca5771fe77bcd6ea840c28395e481161 to your computer and use it in GitHub Desktop.
Save Emuentes/ca5771fe77bcd6ea840c28395e481161 to your computer and use it in GitHub Desktop.
Run all files in repl.it root folder
// 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