简体   繁体   English

在大型Web应用程序中处理JavaScript(可重用性,捆绑,单元测试......)

[英]Dealing with JavaScript in a large web application (reusability, bundling, unit testing…)

Maybe somebody can advise what tool, approach, reference I can use to achieve the following goals for a large web application when it comes to JavaScript: reusability, bundling, unit testing, many developers, stuff like that. 也许有人可以建议我使用什么工具,方法,参考来实现大型Web应用程序在JavaScript方面的以下目标:可重用性,捆绑,单元测试,许多开发人员,类似的东西。 For example I've checked out browserify tool but there's practically no documentation, no book nothing. 例如,我已经检查了browserify工具,但实际上没有文档,没有任何书籍。

Static Code Analysis: 静态代码分析:

JSLint , Google Closure Tools JSLint谷歌关闭工具

JavaScript code checking beyond JSLint JSLint之外的JavaScript代码检查

Unit Testing: 单元测试:

JSUnit JSUnit的

JavaScript unit test tools for TDD 用于TDD的JavaScript单元测试工具

Bundling and Putting It Altogether 捆绑并完全捆绑

Java Based Builds - Wro4j - handles a lot of common web based tools such as JsHint, CssLint, JsMin, Google Closure compressor, YUI Compressor, UglifyJs, Dojo Shrinksafe, Css Variables Support, JSON Compression, Less, Sass, CoffeeScript... 基于Java的构建 - Wro4j - 处理许多常见的基于Web的工具,如JsHint,CssLint,JsMin,Google Closure压缩器,YUI Compressor,UglifyJs,Dojo Shrinksafe,Css变量支持,JSON压缩,Less,Sass,CoffeeScript ......

PHP Based Builds - What's your all-in-one web resource optimizer? 基于PHP的构建 - 什么是您的一体化Web资源优化器?

Multi-developer Environments 多开发人员环境

Source control - SVN or Git . 源代码控制 - SVNGit

Project Tracking Tools, Colloboration Tools, Development Tools - See Atlassian Products (JIRA, Confluence, ...) 项目跟踪工具,合作工具,开发工具 - 参见Atlassian产品(JIRA,Confluence,...)

Continuous Integration Software - Eg Hudson 持续集成软件 - 例如Hudson

我会很短暂,因为我很匆忙,但你绝对应该使用版本控制系统 (例如git ,svn,hg),你也可以使用yeoman,因为它集成了构建,测试和更有用的自动化任务。

Try require.js for the reusability and bundling parts. 尝试require.js以获得可重用性和捆绑部件。

About unit testing there are a lot of tools out there and from what I see, it's linked to which ones you already uses and what/how you will test. 关于单元测试,有很多工具,从我看到的,它与你已经使用的工具以及测试的内容和方式相关联。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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