Brian Kotek has written great plugin to integrate CoffeeScript into Grails project -
grails-coffeescript-compiler-plugin. Everything about configuration of the plugin you can find on
wiki. The plugin cooperates with two coffeescript compilers Rhino and Node. Accordingly to default behaviour ,when both compilers are installed on system, the Node will be chosen. Unfortunately there are some tiny differences between Rhino and Node. In my case I was the only person in the team that has installed Rhino and Node (others have only Rhino). Our code work properly only with cooperation with Rhino.
Because Brian Kotek develop almost everything to force using Rhino I have forked and add few lines of code to make forcing Rhino available through plugin configuration in Config.groovy:
'coffeescript-compiler' {
pluginConfig {
forceRhino = true
minifyInEnvironment = [ Environment.PRODUCTION ]
}
appSource {
coffeeSourcePath = 'src/coffee'
jsOutputPath = 'web-app/js/compiled'
}
}
Kotek already has accepted my pull request so you can use original plugin instead of my fork.
0 komentarze:
Prześlij komentarz