简体   繁体   English

我应该使用什么工作流程进行JavaScript编辑?

[英]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). OperaInternet ExplorerChromeSafari都内置了良好的调试器(链接指向有关调试器的信息)。

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 + SAlt + TabF5一遍又一遍。

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.

相关问题 我应该在这个练习中使用 JavaScript 中的哪个函数? - What function in JavaScript should I use for this exercise? 我应该使用什么模式在Node / JavaScript中制作一个监听机器人? - What pattern should I use for making a listen bot in Node/JavaScript? 我应该使用什么 JavaScript 库来解析 URL 参数? - What JavaScript library should I use for parsing URL parameters? 我应该为这样的javascript按钮使用什么标签? - What tag should i use for a javascript button like this? 我应该使用全局变量吗?如果不是,那又是什么? (JavaScript)的 - Should I use a global variable and if not, what instead? (Javascript) 我应该使用什么方法来计算 JavaScript 中子类的实例? - What method should I use to count instances of subclasses in JavaScript? 我应该使用Javascript,CSS或隐藏控件呈现的图像的内容吗? - Should i use Javascript, CSS or what to hide an image rendered by a control? 我应该使用什么 JavaScript 在网页中输入电话号码? - What JavaScript should I use for a telephone number entry in a webpage? 我应该使用JavaScript验证程序吗? - Should I use a JavaScript validator? 我应该在javascript中使用多态吗? - Should I use polymorphism in javascript?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM