Permalink
Browse files

pass script options to CoffeeScript compiler

  • Loading branch information...
1 parent 5fcb8fb commit 77ced599ef16fde28be810269bea3d185685bff1 @thatdutchguy committed Apr 24, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/windtunnel/index.js
@@ -62,12 +62,12 @@ function createContext() {
jasmine.load(sandbox)
jasmine.init(sandbox, new reporter.SpecReporter(env.reporter))
- sandbox.script = function(scriptPath) {
+ sandbox.script = function(scriptPath, options) {
var filename = getCurrentScriptPath()
var dir = path.dirname(filename)
var fullpath = tools.realpath(path.join(dir, scriptPath))
var data = tools.readfile(fullpath)
- var s = vm.createScript(tools.convertToJs(data, fullpath), fullpath)
+ var s = vm.createScript(tools.convertToJs(data, fullpath, options), fullpath)
s.runInContext(sandbox)
}
return sandbox

0 comments on commit 77ced59

Please sign in to comment.