[英]What workflow should I use for JavaScript editing?
Warning: I have very little JavsScript experience. 警告:我几乎没有JavsScript经验。
In my past programming experience, I usually have a standalone interpreter/compiler, a text editor and a command line to compile/run my software or my tests (I love test driven development). 在过去的编程经验中,我通常有一个独立的解释器/编译器,一个文本编辑器和一个命令行来编译/运行我的软件或测试(我喜欢测试驱动的开发)。 I really like it this way, since I have the feeling of being in complete control over the tools. 我真的很喜欢这种方式,因为我有完全控制工具的感觉。 However, editing JavaScript I need to put statements in a text file , open my web browser and click on reload. 但是,编辑JavaScript我需要将语句放在文本文件中,打开Web浏览器,然后单击reload。 I don't feel comfortable with it, as I cannot really see what is going on (besides some alert boxes). 我对此不太满意,因为我无法真正看到发生了什么(除了一些警报框)。
Can you suggest me (I'm on a Mac) another workflow? 您能建议我(在Mac上)其他工作流程吗? Perhaps with a debugger? 也许用调试器? Is there a standalone JavaScript interpreter? 是否有独立的JavaScript解释器?
Opera , Internet Explorer , Chrome and Safari all come with good debuggers built in (links go to information about the debuggers). Opera , Internet Explorer , Chrome和Safari都内置了良好的调试器(链接指向有关调试器的信息)。
They are all modeled after Firebug , an extension for Firefox (and the existence of which is why Firefox doesn't have one built in). 它们都以Firebug (火狐的扩展)建模(并且Firebug的存在就是Firefox没有内置的原因)。
Firebug has a javascript debugger ,a console, and a command line . Firebug具有javascript调试器 ,控制台和命令行 。 I couldn't live without it. 没有它,我活不下去。
Firebug is a firefox extension. Firebug是Firefox扩展。 They do have firebug lite for other browsers. 他们确实为其他浏览器提供了Firebug Lite 。
As far as workflow goes... Ctrl + S , Alt + Tab , F5 over and over again. 就工作流程而言... Ctrl + S , Alt + Tab , F5一遍又一遍。
I would throw in validation there as well, use jslint either via one of the available command line tools, or via eg. 我也将在那里进行验证,通过可用的命令行工具之一或例如使用jslint。 Aptana which has builtin validation. 具有内置验证功能的Aptana。 Setting up a simple build script is also preferable. 设置一个简单的构建脚本也是可取的。 I do it with all my projects and lets it handle validation, conditional code (debug versions etc) and minifying. 我用我所有的项目来做,并让它处理验证,条件代码(调试版本等)和最小化。
This http://github.com/oyvindkinsey/easyXDM/blob/master/build.xml is for instance the build setup for easyXDM. 例如,此http://github.com/oyvindkinsey/easyXDM/blob/master/build.xml是easyXDM的构建设置。 It does everything from pushing out new versions to the website to creating documentation and zip files.. 它执行从发布新版本到网站到创建文档和zip文件的所有操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.