yii2安裝為什么很慢

yii2安裝為什么很慢

yii2安裝為什么很慢?

其實(shí)yii2本身的安裝是很快的,主要就是里面包含的js和前端框架是比較繁瑣的,可以終止前端js的安裝 這不會(huì)影響你的使用的.

修改fxp-asset為Asset Packagist

參考官方安裝指南Yii advanced template installation提到:

It?uses?asset-packagist?for?managing?bower?and?npm?package?dependencies?through?Composer.?Also?you?can?use?asset-plugin,?as?in?earlier?versions,?but?it?works?slowly.

找到

"config":?{ ????"process-timeout":?1800, ????"fxp-asset":{ ????????"installer-paths":?{ ????????????"npm-asset-library":?"vendor/npm", ????????????"bower-asset-library":?"vendor/bower" ????????} ????} }, "replace":?{ ????"bower-asset/jquery":?">=1.11.0", ????"bower-asset/inputmask":?">=3.2.0", ????"bower-asset/punycode":?">=1.3.0", ????"bower-asset/yii2-pjax":?">=2.0.0" }

修改為

"config":?{ ????"process-timeout":?1800, ????"fxp-asset":?{ ????????"enabled":?false ????} }, "repositories":?[ ????{ ????????"type":?"composer", ????????"url":?"https://asset-packagist.org" ????} ]

修改config/main.php

'aliases'?=>?[ ????'@bower'?=>?'@vendor/bower-asset', ????'@npm'???=>?'@vendor/npm-asset', ],

相關(guān)教程推薦:yii框架

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊12 分享