mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
13 lines
No EOL
334 B
CoffeeScript
13 lines
No EOL
334 B
CoffeeScript
fs = require "fs"
|
|
Path = require "path"
|
|
|
|
MODULE_BASE_PATH = Path.resolve(__dirname + "/../../../modules")
|
|
|
|
modules = []
|
|
for mod in fs.readdirSync(MODULE_BASE_PATH)
|
|
modules.push require(Path.join(MODULE_BASE_PATH, mod, "index"))
|
|
|
|
module.exports = Modules =
|
|
applyRouter: (app) ->
|
|
for module in modules
|
|
module.router?.apply(app) |