Permalink
Browse files

Upgraded to CoffeeScript 1.6.1

  • Loading branch information...
1 parent a22cada commit 71b8de407f109df5f4a14b30234ed4031dd9a77d @edvinasbartkus committed Mar 11, 2013
@@ -5,7 +5,7 @@ import org.grails.plugin.resource.ResourceTagLib
class CoffeescriptResourcesGrailsPlugin {
def loadAfter = ['resources']
- def version = "0.3.6"
+ def version = "0.3.7"
def grailsVersion = "1.3.7 > *"
def dependsOn = [:]
def pluginExcludes = [
@@ -21,8 +21,8 @@ class CoffeeScriptEngine {
def CoffeeScriptEngine(){
try {
classLoader = getClass().getClassLoader()
-
- def coffeeScriptJsResource = (new ClassPathResource('org/grails/plugins/coffeescript/coffee-script-1.3.3.js', getClass().classLoader))
+
+ def coffeeScriptJsResource = (new ClassPathResource('org/grails/plugins/coffeescript/coffee-script-1.6.1.js', getClass().classLoader))
assert coffeeScriptJsResource.exists() : "CoffeeScriptJs resource not found"
def coffeeScriptJsStream = coffeeScriptJsResource.inputStream
@@ -40,13 +40,13 @@ class CoffeeScriptEngine {
}
}
- def compile(String input) {
+ def compile(String input) {
try {
def cx = Context.enter()
def compileScope = cx.newObject(globalScope)
compileScope.setParentScope(globalScope)
compileScope.put("coffeeScriptSrc", compileScope, input)
- def result = cx.evaluateString(compileScope, "CoffeeScript.compile(coffeeScriptSrc)", "CoffeeScript compile command", 0, null)
+ def result = cx.evaluateString(compileScope, "CoffeeScript.compile(coffeeScriptSrc)", "CoffeeScript compile command", 0, null)
return result
} catch (Exception e) {
throw new Exception("""
@@ -55,7 +55,7 @@ class CoffeeScriptEngine {
""")
} finally {
Context.exit()
- }
+ }
}
}
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 71b8de4

Please sign in to comment.