Is there a Javascript IDE that has nothing to do with a browser?

橙三吉。 提交于 2019-12-18 14:53:26

问题


Does anyone know of a program that lets you write javascript; then execute it - all the while having nothing to do with a browser? I don't want DOM manipulation, the equivalent of Console.Write is enough for me.

I'm thinking of something along the lines of DrScheme - nice big code editing window, let's you run it, stop it. While all the other features (debugging, etc) would be wicked, they're not vital.
(source: plt-scheme.org)


回答1:


I've been doing some JavaScript work lately using Mozilla Rhino (basically scripting the Apache POI library), which is a JavaScript interpreter written in Java (you can also compile JavaScript scripts to Java classes). I was running my scripts from command line, but I could have easily set my editor (PSPad) to execute and output the script result inside the editor. I believe the same can be done in Eclipse using External Tools, if that's what you're more comfortable with.

Using Mozilla Rhino is kinda nice. You aren't bothered by all the browser quirks out there and you get a pretty nice version of JavaScript to work with, version 1.7. This version of JavaScript has iterators, generators, let expressions, array comprehensions, destructuring assignment, new array functions and Mozilla Rhino has even built in support for continuations.

The down side of Mozilla Rhino is that its exceptions reports are inconsistent and not that informative at times (sometimes the file name and file line is missing). On the other hand though, the package ships with a debugger built with Java Swing. You can set break points right there and do all the things you'd do with a normal debugger.

I've been using a binary version compiled by myself from the CVS sources as there was a bug in the implementations of iterators, which Norris Boyd fixed it immediately after I reported it.




回答2:


Spket actually looks very cool.

The Spket IDE editor provides features like code completion, syntax highlighting and content outline that helps developers productively create efficient JavaScript code.

http://spket.com/




回答3:


Without the browser you would need something to host / script against so I would say that the os is your first point of call. Some programs provide an extensibility model by using jscript for plugins. You interface with the applications using jscript.

You have .js and .jse files which can be run on the ms scripting host, assuming you are on windows of course.

Check out http://msdn.microsoft.com/en-us/library/4yyeyb0a(VS.85).aspx

So in a nutshell I am saying you COULD write in notepad, and double click the .js/.jse file and run it. This would be the simplest approach.

http://www.aptana.com/ is also very cool

Andrew




回答4:


Uh. A long time ago I tried Aptana and JSEclipse, however maybe here or here you find an answer.




回答5:


Aptana, NetBeans, and Komodo all have great features for JavaScript. Even things like jslint-style syntax checking.




回答6:


Maybe Flex Builder. It uses Actionscript which will accept pure javascript. Or (by inference) FlashDevelop.



来源:https://stackoverflow.com/questions/993968/is-there-a-javascript-ide-that-has-nothing-to-do-with-a-browser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!