Good morning!
I’ve been looking at this: http://gradle.1045684.n5.nabble.com/State-of-javascript-stuff-in-master-td5709818.html and trying to figure out how best to use the RhinoShellExec (http://www.gradle.org/docs/current/groovydoc/org/gradle/plugins/javascript/rhino/RhinoShellExec.html) to execute coffeelint.js (https://github.com/clutchski/coffeelint/blob/master/lib/coffeelint.js). Right now, I have this:
task lintCoffeeScript(type: RhinoShellExec) {
script = “lib/coffeelint.js”
scriptArgs = ["-r", “web-app/js/src”] }
Which doesn’t fail … unfortunately, it doesn’t appear to actually be executing coffeelint.js properly. I’m not sure if I’m running into a node/rhino issue (I can npm install -g coffeelint && coffeelint -r web-app/js/src), or if I need to configure RhinoShellExec with more. When I crack open coffeelint.js, I see that it’s doing a require(‘coffee-script’) - which I’m not sure how/where that would be satisfied (though I’m not seeing any errors:
All projects evaluated. Selected primary task ‘lintCoffeeScript’ Tasks to be executed: [task ‘:lintCoffeeScript’] :lintCoffeeScript Task ‘:lintCoffeeScript’ has not declared any outputs, assuming that it is out-of-date. Starting process ‘command ‘/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java’’. Working directory: /Users/USER_NAME/Projects/PROJECT_DIR Command: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Dfile.encoding=MacRoman -cp /Users/USER_NAME/.gradle/caches/artifacts-14/filestore/org.mozilla/rhino/1.7R3/jar/3bff1e632c665f8cf2d438f77a9f4d0758277db5/rhino-1.7R3.jar org.mozilla.javascript.tools.shell.Main /Users/USER_NAME/Projects/PROJECT_DIR/lib/coffeelint.js -r web-app/js/src An attempt to initialize for well behaving parent process finished. Successfully started process ‘command ‘/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java’’ Process ‘command ‘/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java’’ finished with exit value 0 (state: SUCCEEDED)
BUILD SUCCESSFUL
Can anyone give me a hand with this? Ideally, if the coffee-script dependency is all that’s needed, I am using CoffeeScriptCompile from plugin ‘coffeescript-base’ as well, so maybe there’s a way to pull the dependency from there?
Any assistance or pointers would be much appreciated!!