Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix to allow local or arbitrary modules to be included in the templat…

…e context
  • Loading branch information...
commit 3b6f2c2c1687c14220c66680f528e56f5b9bdacd 1 parent 29690ad
@lhagan lhagan authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/cli/common.coffee
View
4 src/cli/common.coffee
@@ -105,8 +105,10 @@ exports.getOptions = (argv, callback) ->
# load modules and add them to options.locals
async.forEach options.require, (moduleName, callback) ->
logger.verbose "loading module #{ moduleName }"
+ tmp = moduleName.split('/')
+ moduleAlias = tmp[tmp.length-1]
try
- options.locals[moduleName] = require moduleName
+ options.locals[moduleAlias] = require moduleName
callback()
catch error
callback error
Please sign in to comment.
Something went wrong with that request. Please try again.