Closed kids-return closed 4 years ago
Have you considered giving up this project and using npm
or bower
altogether.
Maybe you can do this in the composer update hook npm update
Hello. The server is connected with 1 Gbps Internet connection without any limits.
CDN is a good idea, but it will cost more for us. If you have any suggestions – feel free to share them.
As far as I know there is a packagist mirror for composer in china: https://pkg.phpcomposer.com/
This seems to be a proxy for packagist that is local in china, may be worth to set up something like that for asset-packagist.
首先,Asset Packagist 的目的也是为了解决在 php 项目中安装前端模块的问题,其通过转换 npm / bower 模块并创建一个类似 packagist 的服务为前端模块提供依赖解析和下载。 yii2 2.0 版本发布于 2014 年,所以有着历史原因,然而随着 Node.js / npm 生态的完善和普及,Asset Packagist 这种方式显得很笨拙,对前端开发没有任何益处,yii2 采用这种方式也只是为了向后兼容,避免破坏现有框架的工作方式而已。 Asset Packagist 的存在意义已经很弱了,新的框架(例如 Laravel ,比 yii2 更流行)对前端开发的支持直接构建在 npm 上的,因此,Asset Packagist 镜像的存在的意义也很弱,没有必要为其提供镜像。 相信 yii2 将来会从 Asset Packagist 转移到 npm 上的。
@cebe pkg.phpcomposer.com
There is a problem with their website and it has not been updated for a month.
They think that yii will use npm in the future and does not plan to build a cache of asset-packagist.org
@SilverFire Because Chinese domain names need to go to the government for filing
I used my own domain name to build a cdn cache accelerator, still in the test, it seems that the effect is not bad.
domain: https://asset-packagist.leonsw.com
I still think that using npm
would be a better way.
Yii is used less in China, in part because of slow installations. Many people may give up using yii due to slow installation.
Stale issue message
China visit is very slow! ! !
Is it possible to reduce the frequency of
packages.json
updates becausepackages.json
related files are cached whencomposer
is updated, which results in a long time for each update check. Can you usecdn
or not limit China's access rate?