简体   繁体   中英

What workflow should I use for JavaScript editing?

Warning: I have very little JavsScript experience.

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. 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? Perhaps with a debugger? Is there a standalone JavaScript interpreter?

Opera , Internet Explorer , Chrome and Safari all come with good debuggers built in (links go to information about the debuggers).

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 has a javascript debugger ,a console, and a command line . I couldn't live without it.

Firebug is a firefox extension. They do have firebug lite for other browsers.

As far as workflow goes... Ctrl + S , Alt + Tab , F5 over and over again.

I would throw in validation there as well, use jslint either via one of the available command line tools, or via eg. Aptana which has builtin validation. 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. It does everything from pushing out new versions to the website to creating documentation and zip files..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM