如果我没有做前端开发,我是否需要安装“fxp/组件-资产插件”?

时间:2022-12-23 06:49:01

In this section of the yii2 installation guide there's the following instructions:

在yii2安装指南的这一节中有以下说明:

With Composer installed, you can install Yii by running the following commands under a Web-accessible folder:

在安装了Composer之后,您可以通过在web可访问文件夹下运行以下命令来安装Yii:

composer global require "fxp/composer-asset-plugin:~1.0.3"

作曲家全球需要“fxp / composer-asset-plugin:~ 1.0.3”

composer create-project --prefer-dist yiisoft/yii2-app-basic basic

作曲家的创作-- -- -- -- --优先级-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -

The first command installs the composer asset plugin which allows managing bower and npm package dependencies through Composer.

第一个命令安装composer资产插件,它允许通过composer管理bower和npm包依赖关系。

I've read about composer-asset-plugin here and seems that it's used to manage front-end dependencies through composer. As I'm not developing for front-end, do I need to install this plugin anyway?

我在这里读到过关于组合资产插件的内容,它似乎是用来通过composer来管理前端依赖关系的。由于我没有为前端开发,我需要安装这个插件吗?

3 个解决方案

#1


1  

Yes you do I was not able to install specific version of extension because of not installing it and it was solved after installing it. More details on this link Yii Framework forum post

是的,我不能安装特定版本的扩展,因为没有安装它,安装后就解决了。更多关于这个链接Yii框架论坛帖子的详细信息。

#2


1  

Apparently you have to. Else you can't install Yii.

显然你需要。否则你不能安装Yii。

yiisoft/yii2 requires bower-asset/jquery *@stable -> no matching package found.

#3


1  

Correction: As per ./vendor/yiisoft/yii2/composer.json:

更正:/。/供应商/ yiisoft / yii2 / composer.json:

"require": {
    ...
    "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable",
    ...
}

fxp is, sadly, required. PR submitted to project https://github.com/yiisoft/yii2/issues/14265

可惜的是,他们是必需的。提交给项目https://github.com/yiisoft/yii2/es/14265。

Project owner has also stated here http://www.yiiframework.com/forum/index.php/topic/68361-do-i-need-to-install-fxpcomposer-asset-plugin-if-im-not-doing-front-end-development/page__p__290882#entry290882 that the fxp requirement will be removed in release 2.1

项目所有者还在这里声明了http://www.yiiframework.com/forum/index.php/topic/68361-do- to-install- to-install- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

#1


1  

Yes you do I was not able to install specific version of extension because of not installing it and it was solved after installing it. More details on this link Yii Framework forum post

是的,我不能安装特定版本的扩展,因为没有安装它,安装后就解决了。更多关于这个链接Yii框架论坛帖子的详细信息。

#2


1  

Apparently you have to. Else you can't install Yii.

显然你需要。否则你不能安装Yii。

yiisoft/yii2 requires bower-asset/jquery *@stable -> no matching package found.

#3


1  

Correction: As per ./vendor/yiisoft/yii2/composer.json:

更正:/。/供应商/ yiisoft / yii2 / composer.json:

"require": {
    ...
    "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable",
    ...
}

fxp is, sadly, required. PR submitted to project https://github.com/yiisoft/yii2/issues/14265

可惜的是,他们是必需的。提交给项目https://github.com/yiisoft/yii2/es/14265。

Project owner has also stated here http://www.yiiframework.com/forum/index.php/topic/68361-do-i-need-to-install-fxpcomposer-asset-plugin-if-im-not-doing-front-end-development/page__p__290882#entry290882 that the fxp requirement will be removed in release 2.1

项目所有者还在这里声明了http://www.yiiframework.com/forum/index.php/topic/68361-do- to-install- to-install- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -