You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
303 B
CoffeeScript
14 lines
303 B
CoffeeScript
10 years ago
|
Promise = require "bluebird"
|
||
|
glob = Promise.promisify(require "glob")
|
||
|
rfr = require "rfr"
|
||
|
|
||
|
# This file automatically loads all models.
|
||
|
|
||
|
module.exports = (shelf) ->
|
||
|
Promise.try ->
|
||
|
glob "models/**/*.coffee"
|
||
|
.then (items) ->
|
||
|
for item in items
|
||
|
if item != "models/index.coffee"
|
||
|
rfr(item)(shelf)
|