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

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

问题描述

您知道网络资产的包管理器吗?

我想要一些可以下载库(例如 jQuery)的东西,这样我就可以将它们插入到我的资产管道中.js.* python 包fanstatic 很接近,但他们选择了该库的一个最新"版本,这可能会滞后几个版本.>

Google 的 js cdn 包含其中一些的元数据,但是主要设计为由浏览器直接下载.

解决方案

我找到了这些用于浏览器 javascript 的包管理器:

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

我还发现了 XStatic,它似乎是 fanstatic 不太活跃的版本,并且像 fanstatic 将库包装在 Python 包中.它有相同的限制(版本往往滞后),但编写包装器包似乎很简单,我可以烘焙自己的更新.

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

Do you know a package manager for web assets?

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's js cdn has the metadata for a few of them, but is mostly designed to be downloaded by the browser directly.

解决方案

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

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.

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 and fanstatic are aware of non-js assets and can merge or minify CSS.

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

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