I'm trying to run JSLint via V8.
- I downloaded and built the V8 shell using these instructions.
- The interactive shell
d8
works, and passing a file to it executes that file.
Now I want to execute jslint.js
and pass the name of the file to parse to it. I have tried
d8 jslint.js myfile.js
d8 jslint.js < myfile.js
d8 jslint.js -- myfile.js
No doubt the trouble lines in the end of jslint.js which uses the Rhino readline()
function to get the command-line arguments. Has anyone modified this script to work in V8 or is there a generic way to have V8 pass arguments to it?
Update: Steve's answer reminded me that I did find a way to compile JSLint into an executable much as Steve did, but I was hoping for something that was a little more portable for the other developers.