我唯一倾向于保留的是 jQuery,以方便 DOM 操作,但这不是必需的。我不依赖任何框架或其他任何东西;如果我需要写一些东西,我只需在 vim 或任何可用的文本编辑器中编写(因为我认为 IDE 适合那些懒惰的人或在公司/企业环境中的人)。如果我需要使用一个框架,无论我有什么目的,我都会出去寻找一个框架。但归根结底,我只是写 Javascript。我不专门研究任何框架,因为它们最终都会成为旧闻。更强大的是,只知道 dang 语言是如何工作的,并且能够在任何上下文或情况下工作,无论有或没有框架或库来一直掌握你的手。
The only thing I tend to keep around is jQuery for easy DOM manipulation, but that's not necessary. I don't rely on any frameworks or anything else; if I need to write something, I just write it in vim or whatever text editor i have available (because I think IDEs are for people who are lazy or in corporate/enterprise environments). If I need to use a framework, I'll go out and seek one out for whatever purpose I happen to have. But at the end of the day, I just write Javascript. I don't specialize in any frameworks because they all become old news eventually. It's more powerful to just know how the dang language works and be able to work in any context or situation, with or without a framework or a library to hold your hand all the way.
What editor and editor plugins/modes/scripts do you use? I'm generally an Emacs user, and am using js2.el at the moment, but I'm interested in hearing about other setups.
I generally use Textmate (with the JavaScript, jQuery, and Prototype bundles). When doing heavy front-end development, where I'm tabbing rapidly between HTML, CSS, and JavaScript files, I'll opt for vim's split panel views. When doing so, I either use macvim or Terminal + Visor, depending on my mood. Obviously, I'm a Mac user.
Do you use any sort of IDE (Aptana, Dashcode, or the like)?
No. I used to use Coda, but its text editor features leave much to be desired. I've also toyed with Espresso, which is interesting...but meh.
What JavaScript libraries or frameworks do you use?
I use both jQuery and Prototype, depending on the project's needs. To illustrate each respective framework's strengths, I like to refer to jQuery as a DOM manipulation framework and Prototype a scripting framework. Accordingly, I tend to use jQuery on projects which focus on markup and Prototype on more heavily-scripted, application-type projects.
Do you use any of the languages that compile to JavaScript (GWT, haxe, Objective-J)?
Absolutely not - I have philosophical gripes with such frameworks. Unlike server-side code, front-end code is being run in the user's browser, in an environment that you cannot control. As such, I see it to be a JavaScript developer's responsibility to produce the best code possible. Suboptimal code can have performance ramifications, and the JavaScript compiled by languages like Objective-J (which is the only one from your list that I've used) will never be as tight as code produced by a strong JavaScript developer.
What unit test frameworks do you use? How do you invoke them? Can they be invoked from your editor/IDE, from the command line, from the browser in a web page, from your JavaScript debugger?
I'm a huge fan of QUnit, the jQuery unit testing framework. Dojo's DOH Unit Testing is also nice.
Don't miss FireUnit, a nifty Firebug extension for unit testing.
What automated user interface testing tools do you use (such as Selenium, Watir, Sahi)? Again, how can these be invoked? (Being able to invoke unit tests and interface tests from the command line would be very useful, for running buildbots)
Firebug has a nice code coverage extension, and HRCov is widely considered to be the best of breed. I don't find much use for code coverage in most of my day-to-day JavaScript work.
What do you use for your debugging environment (Firebug, WebKit inspector, etc)? Does it have any integration with your editor or IDE?
As far as I'm concerned, Firebug is the killer app for JavaScript development. Some useful debugging features:
WebKit Inspector is nice, as is DragonFly, and Debug Bar is useful for tracking down IE bugs...but FireBug is the one for me.
What post-processing do you run on your code before deploying it (obfuscators, minifiers, any kind of optimizers)?
I very intentionally do not use any post-processing tools -- one of the great aspects of JavaScript is its openness, and I'd hate to make it more difficult for fledgling JavaScript developers to learn from my work. Not to mention that it's extremely simple to reconstruct obfuscated JavaScript.
There has only been one instance where I've needed to minify JavaScript to save bandwidth. In that case, I set up an SVN post-commit hook to run Doug Crockford's excellent JSMin.
Are there any other essential tools in your toolchain (which are specific to JavaScript development for browser based applications; I already have a perfectly good version control system, bug tracker, etc)?
At the time of asking this question, Google’s closure compiler was not in contention. This is a seriously good tool that minimifies JavaScript better than many others out there. You can run it with page speed to analyze existing websites. It has a lot of other functionality built into it,like detecting dead code, references etc.
jQuery + Plugins because of its similarity to Ruby
Do you use any of the languages that compile to JavaScript (GWT, haxe, Objective-J)?
JSUnit with Blue Ridge (Rails package), but rely more upon Selenium tests
No code quality tools beyond pair programming and tests
Debug with Firebug mostly
Rely upon gzip compression to reduce space
Create lots of small modular JS files
Use rails to statically combine and automatically include these files as needed. This is custom code, but I've blogged about it. This allows you to keep things modular as development grows
Build quite a few jQuery plugins to manage widgets on the site
我倾向于在一些包含单独的、未缩小的脚本的开发页面上进行开发,并且在创建构建时,我运行一个构建脚本(我自己的,用 Ant 编写的),该脚本从版本控制中检查我的代码,连接单独的脚本,删除日志记录和调试调用、缩小/压缩(使用 JSMin 或 YUICompressor)代码并运行单元测试。我的单元测试脚本是我自己的,没什么特别的。
它工作得相当好,但并不完美。
Just started using RubyMine as a JavaScript IDE, purely for the JavaScript support, which is pretty good. It's the same as that in IntelliJ IDEA.
For debugging, Firebug is an obvious must-have, though it has gone downhill a little recently in my opinion. I tend to use logging more than a debugger, so I find log4javascript very useful (though I should probably point out that I did write it). I also use WebKit's inspector thingy and IE 8's debugger occasionally, and Visual Studio's debugger with earlier versions of IE.
For code quality, I use JSLint manually and occasionally since I disagree with some of its recommendations. RubyMine/IntelliJ also has tons of JS "inspections" that analyze your code as you write it and generate warnings next to your code, which I find useful.
I tend to develop on a few development pages that include individual, unminified scripts and when creating a build, I run a build script (my own, written in Ant) that checks out my code from version control, concatenates individual scripts, removes logging and debugging calls, minifies/compresses (using JSMin or YUICompressor) the code, and runs unit tests. My unit testing script is my own and is nothing massively fancy.
I haven't written anything huge in Javascript yet (about 3000 lines in my latest project), but I do JSLint my code and minify/combine it with all the libraries I need in my deploy/build script. My build script also changes the HTML from importing the scripts and libraries directly, to importing the production compressed code. That way you don't have to run the build script to see changes in development which is essential.
YUI Compressor is pretty slow, especially since it starts up the JVM to run, but it gets the job done. Some kind of minification in your deploy script is essential to get rid of all the comments, and if you avoid global variables you'll get a meaningful amount of identifier name length compression too, though not much benefit after gzip. Possibly you'll want another step to remove console.debug lines and other debugging code.
For debugging, FireBug. I'm sure the webkit debugger is fine too.
For developing, vim with an improved js indent script and ctags with some js modifications. I'm not sure what advantages a real IDE has but I'm sure there are some. Vim doesn't do syntax highlighting of HTML inside javascript strings by default, but apparently it can be configured to.
JSLint runs in Rhino easily, but spidermonkey gets done about 3x as fast since it doesn't need to start up the JVM. Crockford doesn't support that arrangement but I managed to get it working somehow.
其他浏览器:IE8、Chrome 3、Safari、Opera(很少使用)以及 IE6 和 IE7(可从 Microsoft 免费下载 Virtual PC 映像)。
后处理:JLint 和 YUI 压缩机。我有一个构建任务来执行 YUI 压缩器部分。
JavaScript 框架:JQuery + JQuery UI
其他东西:JQuery 验证、JSON2
I'm on a slightly different technology stack (asp.net mvc), but here it goes:
IDE: Visual Studio 2008 + ReSharper, Asp.Net MVC
Editor: Notepad++ (most of my time is in VS, but Notepad++ has better syntax highlighting for JavaScript)
Dev Browser: FireFox+Firebug+YSlow+PageSpeed+FireCookie Also add Developer Toolbar
Other Browsers: IE8, Chrome 3, Safari, Opera (rarely used), and IE6 and IE7 via virtual machines (freely downloadable Virtual PC images from Microsoft).
Post-Processing: JLint and YUI Compressor. I have a build task do the YUI compressor part.
Web Tech has moved along a bit so I thought I'd mention some nice modern tools and frameworks for anyone seeing this question in 2017.
What editor and editor plugins/modes/scripts do you use?
Atom is my text editor of choice and as I'm in the MS ecosystem, Visual Studio 2013 is the IDE I use, though I avoid VS for JavaScript development. I do virtually all of my JavaScript development exclusively with Atom wherever I can though.
I have a fair few plugins which help my work flow.
atom-beautify which I use to clean up any styling issues I might introduce, it does this on save so makes things easy for me as I save and check-in often.
atom-easy-jsdoc which allows me to insert jsdoc comments using a hotkey combo, this is great as it lets me automatically generate documentation for code, especially useful for API development.
atom-ternjs is the package I use for JavaScript code completion, I don't need this often but it is handy to have.
minimap is a plugin that allows me to see a low detail outline of all the code in a particular document, I find it easier to use than scrollbars. YMMV.
pigments is a plugin that renders colors when it detects hex colors in CSS behind the text. Useful if you need to adjust and see the result quickly.
Do you use any sort of IDE (Aptana, Dashcode, or the like)?
See above :)
What JavaScript libraries or frameworks do you use?
I tend to use RequireJS for home projects and an in-house module loader at work. I don't generally use libraries and frameworks in my projects, though when I do I'm quite partial to AngularJS (1.x). It all depends on what I'm doing.
Do you use any of the languages that compile to JavaScript (GWT, haxe, Objective-J)?
Nope.
What unit test frameworks do you use? How do you invoke them? Can they be invoked from your editor/IDE, from the command line, from the browser in a web page, from your JavaScript debugger?
I use Node.js with Karma test runner as the test runner (who'da thunk it?), Jasmine as my test Framework and sinonJS as my stubbing/mocking library for test development.
Karma can be configured to watch the file system for changes (or a task runner like grunt with file watching plugins works too) and I have it execute all my tests each time a file is saved. It has the added benefit of being able to run your tests against multiple browsers concurrently. So it'll test JS against IE, Edge, Chrome, Firefox, PhantomJS etc... Which is extremely useful.
I have my js projects setup to run grunt tasks. I typically just execute 'grunt devmode' from a command prompt / terminal and that's it, my tests run. For Continuous Integration on commit I have a separate grunt task that only runs the tests once. For home use I have TravisCI run that task whenever a push occurs.
What other code quality tools do you use (JSlint, code coverage tools, or anything of the sort)?
I use JSHint as it's less picky than JSLint. For code coverage I use Istanbul which incidentally runs whenever my unit tests run, which is super useful.
What do you use for your debugging environment (Firebug, WebKit inspector, etc)? Does it have any integration with your editor or IDE?
I use whichever Web Browser is having problems. If it's server side, e.g. Node, I use node-debugger as I can debug straight from Atom.
What post-processing do you run on your code before deploying it (obfuscators, minifiers, any kind of optimizers)?
I generally don't do this, that said for web projects ideally a minifier and uglifier.
Do you have any sort of tools for managing module dependencies or dynamically loading code as it's needed? The application I'm writing will be working with a large amount of code, and I would like to keep load times down, so tools for tracking what modules are needed or loading code on demand would be helpful.
Yep! I use the RequireJS AMD implementation. I use npm as my package manager of choice, although if I'm using Visual Studio, I'll use nuget.
Are there any other essential tools in your toolchain (which are specific to JavaScript development for browser based applications; I already have a perfectly good version control system, bug tracker, etc)?
Not quite sure I understand the question, but I use Git for home projects as and TFS at work, GitHub as my repo host, TravisCI for continuous integration and Coveralls (code coverage reporter for Git repositories).
Editor: Notepad or any other text editor with syntax highlighting
IDE: can be Dreamweaver, Aptana, Netbeans - up to your personal preference.
Javascript Framework: I'm more used to jQuery and I still recommend jQuery. you can look into adding some "plugins" to jQuery. some are really cool. like Facebox (http://famspam.com/facebox) - a jQuery Facebook-like popup box which is easy to use. or jQuery Cookie plugin
Debugging: Firebug (FireCookie, Page Speed, YSlow) - no integration with IDE but is magic on the browser. If you need cross browser debugging, you can go for Firebug Lite.
You can easily use console.log() to debug instead of alert (especially when you are doing javascript with great amount of callback, timers, AJAX and so on. You don't want an alert statement to break the way it should originally be.
发布评论
评论(11)
Google Wave 已启用by GWT 所以对于更大的应用程序来说它似乎是一个不错的选择。
Google wave is powered by GWT so it seems to be a good option for bigger apps.
我唯一倾向于保留的是 jQuery,以方便 DOM 操作,但这不是必需的。我不依赖任何框架或其他任何东西;如果我需要写一些东西,我只需在 vim 或任何可用的文本编辑器中编写(因为我认为 IDE 适合那些懒惰的人或在公司/企业环境中的人)。如果我需要使用一个框架,无论我有什么目的,我都会出去寻找一个框架。但归根结底,我只是写 Javascript。我不专门研究任何框架,因为它们最终都会成为旧闻。更强大的是,只知道 dang 语言是如何工作的,并且能够在任何上下文或情况下工作,无论有或没有框架或库来一直掌握你的手。
The only thing I tend to keep around is jQuery for easy DOM manipulation, but that's not necessary. I don't rely on any frameworks or anything else; if I need to write something, I just write it in vim or whatever text editor i have available (because I think IDEs are for people who are lazy or in corporate/enterprise environments). If I need to use a framework, I'll go out and seek one out for whatever purpose I happen to have. But at the end of the day, I just write Javascript. I don't specialize in any frameworks because they all become old news eventually. It's more powerful to just know how the dang language works and be able to work in any context or situation, with or without a framework or a library to hold your hand all the way.
我通常使用 Textmate (带有 JavaScript, < a href="https://web.archive.org/web/20100810213346/http://svn.textmate.org:80/trunk/Bundles/JavaScript%20jQuery.tmbundle/" rel="nofollow noreferrer">jQuery< /a> 和 原型 捆绑包)。当进行繁重的前端开发时,我需要在 HTML、CSS 和 JavaScript 文件之间快速切换,我会选择 vim 的拆分面板视图。这样做时,我要么使用 macvim 或终端 + 遮阳板,取决于我的心情。显然,我是 Mac 用户。
不,我曾经使用 Coda,但它的文本编辑器功能还有很多不足之处。我还尝试过 Espresso,这很有趣......但是,嗯。
我同时使用 jQuery 和 原型,取决于项目的需要。为了说明每个框架的优势,我喜欢将 jQuery 称为DOM 操作框架,并将原型称为脚本框架。因此,我倾向于在专注于标记的项目上使用 jQuery,在脚本较多的应用程序类型项目上使用 Prototype。
绝对不是——我对这样的框架有哲学上的抱怨。与服务器端代码不同,前端代码在用户的浏览器中运行,处于您无法控制的环境中。因此,我认为 JavaScript 开发人员有责任编写尽可能最好的代码。次优代码可能会产生性能影响,并且由诸如 Objective-J 之类的语言(这是我使用过的列表中唯一的一种语言)编译的 JavaScript 永远不会像强大的 JavaScript 开发人员生成的代码那样紧凑。
我是 QUnit 的超级粉丝,jQuery 单元测试框架。 Dojo 的 DOH 单元测试 也不错。
不要错过 FireUnit,这是一个用于单元测试的漂亮 Firebug 扩展。
另请参阅 Razor。
必要时我使用 Selenium,但这种情况很少见。
我使用并喜欢 JSLint。
Firebug 有一个很好的代码覆盖率扩展,以及HRCov 被广泛认为是最好的品种。我发现代码覆盖率在我的大部分日常 JavaScript 工作中没有多大用处。
就我而言,Firebug 是 JavaScript 开发的杀手级应用程序。一些有用的调试功能:
WebKit Inspector 很好,DragonFly 和 调试栏 对于追踪 IE bug 很有用...但 FireBug 更适合我。
我有意不使用任何后处理工具——JavaScript 的伟大之处之一就是它的开放性,我不想让初出茅庐的 JavaScript 开发人员更难从我的工作中学习。更不用说重构混淆的 JavaScript 非常简单。
只有一次我需要缩小 JavaScript 以节省带宽。在这种情况下,我设置了 SVN 帖子-commit hook 运行 Doug Crockford 的优秀 JSMin。
alert()
函数;)一个不错的 JSON 验证器 是
有用。
模糊测试
但 Crosscheck 在我的工具包中。
I generally use Textmate (with the JavaScript, jQuery, and Prototype bundles). When doing heavy front-end development, where I'm tabbing rapidly between HTML, CSS, and JavaScript files, I'll opt for vim's split panel views. When doing so, I either use macvim or Terminal + Visor, depending on my mood. Obviously, I'm a Mac user.
No. I used to use Coda, but its text editor features leave much to be desired. I've also toyed with Espresso, which is interesting...but meh.
I use both jQuery and Prototype, depending on the project's needs. To illustrate each respective framework's strengths, I like to refer to jQuery as a DOM manipulation framework and Prototype a scripting framework. Accordingly, I tend to use jQuery on projects which focus on markup and Prototype on more heavily-scripted, application-type projects.
Absolutely not - I have philosophical gripes with such frameworks. Unlike server-side code, front-end code is being run in the user's browser, in an environment that you cannot control. As such, I see it to be a JavaScript developer's responsibility to produce the best code possible. Suboptimal code can have performance ramifications, and the JavaScript compiled by languages like Objective-J (which is the only one from your list that I've used) will never be as tight as code produced by a strong JavaScript developer.
I'm a huge fan of QUnit, the jQuery unit testing framework. Dojo's DOH Unit Testing is also nice.
Don't miss FireUnit, a nifty Firebug extension for unit testing.
Also see Razor.
When necessary I use Selenium, but this is rare.
I use and love JSLint.
Firebug has a nice code coverage extension, and HRCov is widely considered to be the best of breed. I don't find much use for code coverage in most of my day-to-day JavaScript work.
As far as I'm concerned, Firebug is the killer app for JavaScript development. Some useful debugging features:
WebKit Inspector is nice, as is DragonFly, and Debug Bar is useful for tracking down IE bugs...but FireBug is the one for me.
I very intentionally do not use any post-processing tools -- one of the great aspects of JavaScript is its openness, and I'd hate to make it more difficult for fledgling JavaScript developers to learn from my work. Not to mention that it's extremely simple to reconstruct obfuscated JavaScript.
There has only been one instance where I've needed to minify JavaScript to save bandwidth. In that case, I set up an SVN post-commit hook to run Doug Crockford's excellent JSMin.
alert()
function ;)a nice JSON validator is
useful.
fuzzing
but Crosscheck is in my toolkit.
在提出此问题时,Google 的闭包编译器并未出现争用。
这是一个非常好的工具,它比其他许多工具更好地最小化了 JavaScript。您可以使用页面速度运行它来分析现有网站。它内置了许多其他功能,例如检测死代码、引用等。
At the time of asking this question, Google’s closure compiler was not in contention.
This is a seriously good tool that minimifies JavaScript better than many others out there. You can run it with page speed to analyze existing websites. It has a lot of other functionality built into it,like detecting dead code, references etc.
刚刚开始使用RubyMine作为JavaScript IDE,纯粹是为了JavaScript支持,这还不错。和IntelliJ IDEA中的一样。
对于调试来说,Firebug 显然是必备的,尽管我认为它最近有点走下坡路。我倾向于使用日志记录而不是调试器,所以我发现 log4javascript 非常有用(尽管我应该指出它是我写的)。我偶尔也会使用 WebKit 的检查器和 IE 8 的调试器,以及早期版本 IE 的 Visual Studio 调试器。
为了代码质量,我偶尔会手动使用 JSLint,因为我不同意它的一些建议。 RubyMine/IntelliJ 还具有大量 JS“检查”,可以在您编写代码时对其进行分析,并在代码旁边生成警告,我认为这很有用。
我倾向于在一些包含单独的、未缩小的脚本的开发页面上进行开发,并且在创建构建时,我运行一个构建脚本(我自己的,用 Ant 编写的),该脚本从版本控制中检查我的代码,连接单独的脚本,删除日志记录和调试调用、缩小/压缩(使用 JSMin 或 YUICompressor)代码并运行单元测试。我的单元测试脚本是我自己的,没什么特别的。
它工作得相当好,但并不完美。
Just started using RubyMine as a JavaScript IDE, purely for the JavaScript support, which is pretty good. It's the same as that in IntelliJ IDEA.
For debugging, Firebug is an obvious must-have, though it has gone downhill a little recently in my opinion. I tend to use logging more than a debugger, so I find log4javascript very useful (though I should probably point out that I did write it). I also use WebKit's inspector thingy and IE 8's debugger occasionally, and Visual Studio's debugger with earlier versions of IE.
For code quality, I use JSLint manually and occasionally since I disagree with some of its recommendations. RubyMine/IntelliJ also has tons of JS "inspections" that analyze your code as you write it and generate warnings next to your code, which I find useful.
I tend to develop on a few development pages that include individual, unminified scripts and when creating a build, I run a build script (my own, written in Ant) that checks out my code from version control, concatenates individual scripts, removes logging and debugging calls, minifies/compresses (using JSMin or YUICompressor) the code, and runs unit tests. My unit testing script is my own and is nothing massively fancy.
It works reasonably well but isn't perfect.
我还没有用 Javascript 编写任何大的东西(在我的最新项目中大约有 3000 行),但我对我的代码进行了 JSLint 并将其与我的部署/构建脚本中需要的所有库进行缩小/组合。我的构建脚本还将 HTML 从直接导入脚本和库更改为导入生产压缩代码。这样您就不必运行构建脚本来查看开发中的更改,这是必不可少的。
YUI Compressor 相当慢,特别是因为它启动 JVM 来运行,但它得到工作完成了。部署脚本中的某种缩小对于消除所有注释至关重要,如果避免全局变量,您也会获得有意义的标识符名称长度压缩,尽管在 gzip 之后没有太大好处。您可能需要另一个步骤来删除 console.debug 行和其他调试代码。
用于调试,FireBug。我确信 webkit 调试器也很好。
对于开发,vim 具有改进的 js 缩进脚本,ctags 具有一些 js 修改。我不确定真正的 IDE 有什么优点,但我确信有一些。默认情况下,Vim 不会对 javascript 字符串内的 HTML 进行语法高亮显示,但是 显然它可以配置为。
JSLint 在 Rhino 中运行很容易,但 Spidermonkey 的完成速度大约是原来的 3 倍,因为它不需要启动 JVM。克罗克福德不支持这种安排,但我设法以某种方式让它发挥作用。
I haven't written anything huge in Javascript yet (about 3000 lines in my latest project), but I do JSLint my code and minify/combine it with all the libraries I need in my deploy/build script. My build script also changes the HTML from importing the scripts and libraries directly, to importing the production compressed code. That way you don't have to run the build script to see changes in development which is essential.
YUI Compressor is pretty slow, especially since it starts up the JVM to run, but it gets the job done. Some kind of minification in your deploy script is essential to get rid of all the comments, and if you avoid global variables you'll get a meaningful amount of identifier name length compression too, though not much benefit after gzip. Possibly you'll want another step to remove console.debug lines and other debugging code.
For debugging, FireBug. I'm sure the webkit debugger is fine too.
For developing, vim with an improved js indent script and ctags with some js modifications. I'm not sure what advantages a real IDE has but I'm sure there are some. Vim doesn't do syntax highlighting of HTML inside javascript strings by default, but apparently it can be configured to.
JSLint runs in Rhino easily, but spidermonkey gets done about 3x as fast since it doesn't need to start up the JVM. Crockford doesn't support that arrangement but I managed to get it working somehow.
我使用的技术堆栈(asp.net mvc)略有不同,但情况如下:
还可以通过虚拟机添加开发人员工具栏
I'm on a slightly different technology stack (asp.net mvc), but here it goes:
Also add Developer Toolbar
网络技术已经取得了一些进展,所以我想我应该为 2017 年看到这个问题的人提到一些不错的现代工具和框架。
Atom 是我的文本编辑器由于我处于 MS 生态系统中,所以我使用 Visual Studio 2013 IDE,尽管我避免使用 VS 进行 JavaScript 开发。只要有可能,我几乎所有的 JavaScript 开发都只使用 Atom 进行。
我有很多插件可以帮助我的工作顺利进行。
介绍一下,它在保存时执行此操作,因此在我保存时使事情变得容易
并经常办理入住。
热键组合,这很棒,因为它可以让我自动生成
代码文档,对于 API 开发特别有用。
不经常需要这个,但拥有它很方便。
特定文档中的代码,我发现它比
滚动条。 YMMV。
在文本后面的 CSS 中。如果您需要调整并查看
很快就能得到结果。
见上文:)
我倾向于在家庭项目中使用 RequireJS,在工作中使用内部模块加载器。我通常不会在我的项目中使用库和框架,但当我使用时,我相当偏爱 AngularJS (1.x)。这完全取决于我在做什么。
没有。
我使用 Node.js 和 Karma 测试运行程序作为测试运行程序(谁知道?),Jasmine 作为我的测试框架和 sinonJS 作为我用于测试开发的存根/模拟库。
Karma 可以配置为监视文件系统的更改(或者像 grunt 这样带有文件监视插件的任务运行器也可以工作),并且我让它在每次保存文件时执行所有测试。它的另一个好处是能够同时针对多个浏览器运行测试。因此它将针对 IE、Edge、Chrome、Firefox、PhantomJS 等测试 JS...这非常有用。
我的 js 项目设置为运行 grunt 任务。我通常只是从命令提示符/终端执行“grunt devmode”,就这样,我的测试运行了。对于提交时的持续集成,我有一个单独的 grunt 任务,仅运行测试一次。对于家庭使用,每当发生推送时,我都会让 TravisCI 运行该任务。
我使用 JSHint,因为它比 JSLint 更挑剔。对于代码覆盖率,我使用 Istanbul,每当我的单元测试运行时它都会偶然运行,这非常有用。
我使用有问题的网络浏览器。如果是服务器端,例如 Node,我使用 node-debugger 因为我可以直接从 Atom 进行调试。
我通常不这样做,也就是说对于网络项目来说,最好是缩小器和丑化器。
是的!我使用 RequireJS AMD 实现。我使用 npm 作为我选择的包管理器,尽管如果我使用的是 Visual Studio ,我将使用 nuget。
不太确定我理解这个问题,但我在工作中使用 Git 进行家庭项目,使用 TFS,使用 GitHub 作为我的存储库主机,使用 TravisCI 进行持续集成,使用 Coveralls(Git 存储库的代码覆盖率报告器)。
Web Tech has moved along a bit so I thought I'd mention some nice modern tools and frameworks for anyone seeing this question in 2017.
Atom is my text editor of choice and as I'm in the MS ecosystem, Visual Studio 2013 is the IDE I use, though I avoid VS for JavaScript development. I do virtually all of my JavaScript development exclusively with Atom wherever I can though.
I have a fair few plugins which help my work flow.
introduce, it does this on save so makes things easy for me as I save
and check-in often.
hotkey combo, this is great as it lets me automatically generate
documentation for code, especially useful for API development.
don't need this often but it is handy to have.
the code in a particular document, I find it easier to use than
scrollbars. YMMV.
in CSS behind the text. Useful if you need to adjust and see the
result quickly.
See above :)
I tend to use RequireJS for home projects and an in-house module loader at work. I don't generally use libraries and frameworks in my projects, though when I do I'm quite partial to AngularJS (1.x). It all depends on what I'm doing.
Nope.
I use Node.js with Karma test runner as the test runner (who'da thunk it?), Jasmine as my test Framework and sinonJS as my stubbing/mocking library for test development.
Karma can be configured to watch the file system for changes (or a task runner like grunt with file watching plugins works too) and I have it execute all my tests each time a file is saved. It has the added benefit of being able to run your tests against multiple browsers concurrently. So it'll test JS against IE, Edge, Chrome, Firefox, PhantomJS etc... Which is extremely useful.
I have my js projects setup to run grunt tasks. I typically just execute 'grunt devmode' from a command prompt / terminal and that's it, my tests run. For Continuous Integration on commit I have a separate grunt task that only runs the tests once. For home use I have TravisCI run that task whenever a push occurs.
I use JSHint as it's less picky than JSLint. For code coverage I use Istanbul which incidentally runs whenever my unit tests run, which is super useful.
I use whichever Web Browser is having problems. If it's server side, e.g. Node, I use node-debugger as I can debug straight from Atom.
I generally don't do this, that said for web projects ideally a minifier and uglifier.
Yep! I use the RequireJS AMD implementation. I use npm as my package manager of choice, although if I'm using Visual Studio, I'll use nuget.
Not quite sure I understand the question, but I use Git for home projects as and TFS at work, GitHub as my repo host, TravisCI for continuous integration and Coveralls (code coverage reporter for Git repositories).
编辑器:记事本或任何其他文本
具有语法突出显示的编辑器
IDE:可以是 Dreamweaver、Aptana、
Netbeans - 由您个人决定
IDE
Javascript框架:我比较习惯
jQuery,我仍然推荐
jQuery。
你可以考虑向 jQuery 添加一些“插件”。有些真的很酷。 like Facebox (http://famspam.com/facebox) - 一个类似 jQuery Facebook 的弹出框,很简单使用。或者 jQuery Cookie 插件
调试:Firebug(FireCookie、Page
Speed, YSlow) - 不与
IDE却在浏览器上很神奇。如果
你需要跨浏览器调试,你
可以选择 Firebug Lite。
您可以轻松地使用 console.log() 来调试而不是警报(特别是当您正在使用大量回调、计时器、AJAX 等执行 JavaScript 时。您不希望警报语句破坏它的方式本来应该是。
http://dean.edwards.name/packer/
Editor: Notepad or any other text
editor with syntax highlighting
IDE: can be Dreamweaver, Aptana,
Netbeans - up to your personal
preference.
Javascript Framework: I'm more used
to jQuery and I still recommend
jQuery.
you can look into adding some "plugins" to jQuery. some are really cool. like Facebox (http://famspam.com/facebox) - a jQuery Facebook-like popup box which is easy to use. or jQuery Cookie plugin
Debugging: Firebug (FireCookie, Page
Speed, YSlow) - no integration with
IDE but is magic on the browser. If
you need cross browser debugging, you
can go for Firebug Lite.
You can easily use console.log() to debug instead of alert (especially when you are doing javascript with great amount of callback, timers, AJAX and so on. You don't want an alert statement to break the way it should originally be.
Post-processing: Packer -
http://dean.edwards.name/packer/
我使用 Dashcode 来开发 Mac Widgets,为此它“还可以”,并且有很多面向小部件的功能,但对于其他一切,TextMate
I use Dashcode to develop Mac Widgets and for that it is "ok" and has a lot of widget orientated features but for everything else, TextMate