是否有与浏览器无关的Javascript IDE? [英] Is there a Javascript IDE that has nothing to do with a browser?

查看:93
本文介绍了是否有与浏览器无关的Javascript IDE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道一个允许你编写javascript的程序;然后执行它 - 一直与浏览器无关?我不想要DOM操作,相当于Console.Write对我来说已经足够了。

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.

我正在考虑DrScheme的一些东西 - 很棒的大代码编辑窗口,让你运行它,停止它。虽然所有其他功能(调试等)都是邪恶的,但它们并不重要。
DrScheme http://plt-scheme.org/screenshots/drscheme-env.jpg

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. DrScheme http://plt-scheme.org/screenshots/drscheme-env.jpg

推荐答案

我最近使用 Mozilla Rhino (基本上编写了 Apache POI 库的脚本),这是一个用Java编写的JavaScript解释器(您也可以将JavaScript脚本编译为Java类)。我从命令行运行我的脚本,但我可以轻松设置我的编辑器(PSPad)来执行并在编辑器中输出脚本结果。我相信使用外部工具可以在Eclipse中完成同样的工作,如果这是你更熟悉的。

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.

使用Mozilla Rhino有点不错。你不会受到所有浏览器怪癖的困扰,你可以得到一个非常好的JavaScript版本,版本1.7 。这个版本的JavaScript有迭代器,生成器,let表达式,数组解析,解构赋值,新的数组函数,Mozilla Rhino甚至内置了对continuation的支持。

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.

失败Mozilla Rhino的例外报告是不一致的,有时不提供信息(有时缺少文件名和文件行)。另一方面,该软件包附带了一个使用Java Swing构建的调试器。您可以在那里设置断点,并使用普通调试器完成所有操作。

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.

我一直在使用我自己编写的CVS二进制版本因为在迭代器的实现中存在一个错误,Norris Boyd在我报告之后立即修复了它。

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.

这篇关于是否有与浏览器无关的Javascript IDE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆