Make use of nplugm.load

This commit is contained in:
Juan Cruz Viotti 2015-01-23 13:24:57 -04:00
parent ff9558ab32
commit ff0b513188

View File

@ -100,11 +100,11 @@ registerPlugin = (plugin) ->
return capitano.command(plugin) if not _.isArray(plugin)
return _.each(plugin, capitano.command)
try
for plugin in nplugm.getPluginsByGlob('resin-plugin-*')
nplugm.load 'resin-plugin-*', (error, plugin) ->
return console.error(error.message) if error?
registerPlugin(plugin.require())
catch error
errors.handle(error)
, (error, loadedPlugins) ->
errors.handle(error) if error?
cli = capitano.parse(process.argv)