Last Updated: February 25, 2016
·
2.018K
· cgarvis

Auto require a directory in Node.js

results = []
require("fs").readdirSync(__dirname).forEach (file) ->
  results.push require("#{__dirname}/#{file}") unless file is "index.coffee"

module.exports = results