dungeonary
Version:
D&D and tabletop RPG library for rolling dice, generating adventures, making characters, searching 5e and PF SRD for monsters and spells, and anything else that might come in handy
17 lines (16 loc) • 400 B
JavaScript
// List all local components here
const components = [
'./adventuregen',
'./beastiary',
'./diceroller',
'./spellbook'
]
// Go through each chunk of the library and set each exported
// function as its own export of this module
for (sublib of components) {
let lib = require(sublib)
for (operation in lib) {
exports[operation] = lib[operation]
}
console.log(sublib + " loaded!")
}