Web资产的包管理器 [英] A package manager for web assets

查看:158
本文介绍了Web资产的包管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道一个Web资产的包管理器吗?

Do you know a package manager for web assets?

我想要一些可以下载jQuery等库的东西,这样我就可以把它们插入我的资产管道了。 js。* python包< a href =http://fanstatic.org/ =noreferrer> fanstatic 很接近,但是他们挑选了一个最新版本的库,这可能落后于几个版本。

I'd like something that can download libraries such as jQuery so I can plug them into my asset pipeline. The js.* python packages for fanstatic are close, but they pick a single "latest" version of the library, which can lag a few releases behind.

Google的 js cdn 其中一些的元数据,但主要是由浏览器直接下载。

Google's js cdn has the metadata for a few of them, but is mostly designed to be downloaded by the browser directly.

推荐答案

我发现了这些浏览器中的软件包管理器javascript:

I've found these package managers for in-browser javascript:


  • CPM (CommonJS包管理器),专注于Dojo包,在 http:/ /packages.dojofoundation.org/ (约60个包)。 CPM使用映射字段扩充CommonJS格式,以描述依赖包中的模块可以要求()d

  • Caolan的 Jam ,其档案位于< a href =http://jamjs.org/packages/ =nofollow noreferrer> http://jamjs.org/packages/ 。以下是 Jam包装指南

  • Ender 搭载 npm 对于包管理,并提供一个看起来像AMD的客户端(我不确定AMD的兼容性,根据错误报告留给每个包)。以下是Ender 打包文档。以下是包含ender关键字的软件包。 Ender并不专注于打包现有的库,尽管它的Jeesh初学者包是jQuery的模块化,大部分兼容的替代品。

  • CPM (CommonJS package manager), focused on Dojo packages, with an archive at http://packages.dojofoundation.org/ (about 60 packages). CPM augments the CommonJS format with a mappings field to describe how modules from dependent packages can be require()d
  • Caolan's Jam, whose archive is at http://jamjs.org/packages/. Here is the Jam packaging guide.
  • Ender piggybacks on npm for package management, and provides a client that looks like AMD (I'm not sure about AMD compatibility, which according to a bug report is left up to each package). Here are the Ender packaging docs. Here are packages with the ender keyword. Ender doesn't focus on packaging existing libraries, though its Jeesh starter pack is a modular, mostly-compatible replacement for jQuery.

大多数这些可以在浏览器加载器的 AMD格式中发布,并且可以加载通过 RequireJS 。他们还倾向于使用 CommonJS包格式(也由npm使用)作为他们的package.json元数据。

Most of these can publish in the AMD format for browser loaders, and can be loaded by RequireJS. They also tend to use the CommonJS package format (also used by npm) for their package.json metadata.

我还找到了 XStatic ,这似乎是一个不太活跃的狂热版本,并像狂热包装Python包中的库。它有相同的限制(版本往往滞后),但编写一个包装器包似乎很简单,我可以烘焙自己的更新。

I also found XStatic, which seems to be a less-active version of fanstatic, and like fanstatic wraps the libraries in Python packages. It has the same limitation (versions tend to lag), but writing a wrapper package seems simple enough that I can bake my own updates.

BPM和fanstatic知道非js资产,可以合并或缩小CSS。

BPM and fanstatic are aware of non-js assets and can merge or minify CSS.

这篇关于Web资产的包管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆