为 Javascript 构建自动化和部署
我与另外两名前端开发人员一起在一家公共广播公司的数字部门工作。我们目前正在研究改进我们的 Javascript 工作流程和构建流程。诸如打包、缩小、版本控制等。
在理想的情况下,我们将为所有 Javascript 相关库(如 jQuery)和我们自己构建的东西拥有一个全局存储库,可以轻松地将其包含在许多项目中并进行版本控制。
我们所有的后端开发人员都使用 Maven 及其 Java 代码来完成此过程。我想知道人们是否有使用 Maven 和 Javascript 的经验,或者是否有其他可能适合(或更好)这项工作的工具的经验。一般来说,人们是否拥有关于为前端和 JavaScript 开发设置工作流程/构建流程的良好资源。
i work at the digital department of a public broadcaster, together with two other frontend developers. We're currently looking into improving our Javascript workflow and build processes. Stuff like packaging, minifying, versioning, etcetera.
In an ideal scenario, we would have a global repository for all Javascript-related libraries (like jQuery) and stuff we build ourselves, that can be easily included in lots of projects and versioned.
All of our backend developers use Maven for this process with their Java code. I'm wondering if people have experience with Maven and Javascript, or maybe with other tools that might be good (or better) for the job. And in general if people have good resources about setting up workflow / build processes for frontend and javascript development.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们使用 Hudson (http://hudson-ci.org/) 来持续构建/集成我们的 Python (Django通过 zc.buildout)、R 和其他几种类型的项目。每当有人将代码签入中央 VCS 时,就会触发构建并运行测试套件。构建和测试状态显示在办公室的中央屏幕上。
Hudson 不仅构建和测试,还使用 pep8 和 pyflakes 等检查编码风格和语法错误。目前仅使用 jslint 检查 Javascript,但我们将来可能会使用 之类的内容对其进行单元测试xpcshell(更多信息)。
We use Hudson (http://hudson-ci.org/) to continuously build/integrate our Python (Django via zc.buildout), R and several other types of projects. Whenever someone checks in code to the central VCS, a build is triggered and the test suite(s) will run. The build and test status is shown on a central screen in the office.
Hudson not only builds and tests, but also checks for coding style and syntax errors using pep8 and pyflakes, amongst others. Javascript is only checked with jslint at this point, but we may unit-test that in the future using something like xpcshell (more info).
** 编辑 **
直接前往 Jawr,保持休息以寻找替代方案
** 编辑 **
首先是 Ruby 的 rake 理论上可以通过 jruby 理论上可以在POM中配置和运行。
还有 Jake,但不确定是否是最新的 Rhino 支持 CommonJS。
在写这个 awnser 时,我刚刚遇到 Jawr ,它看起来非常有趣,而且似乎有 maven 支持/插件。
您已经了解的最后一个选项是使用 RequireJS 或 RequireJS 进行动态加载。 com/" rel="nofollow">LABJS.
** edit **
Go straight for Jawr, keeping rest in answer for alternatives
** edit **
First of all there's Ruby's rake which in theory can be used through jruby and in theory can be configured and run in the POM.
There's also Jake, but not sure if the latest Rhino supports CommonJS.
Whilst writing this awnser, I just came across Jawr which looks really interresting and there seems to be maven support/plugins.
The last option you already know about is dynamic loading using for example RequireJS or LABJS.